본문 바로가기

전체 글

(2344)
(C++) - LeetCode (easy) 628. Maximum Product of Three Numbers https://leetcode.com/problems/maximum-product-of-three-numbers/description/ Maximum Product of Three Numbers - LeetCode Can you solve this real interview question? Maximum Product of Three Numbers - Given an integer array nums, find three numbers whose product is maximum and return the maximum product. Example 1: Input: nums = [1,2,3] Output: 6 Example 2: Input: nums = [ leetcode.com 정렬 문제였습니다. ..
(SQL) - LeetCode (easy) 627. Swap Salary https://leetcode.com/problems/swap-salary/description/ Swap Salary - LeetCode Can you solve this real interview question? Swap Salary - Table: Salary +-------------+----------+ | Column Name | Type | +-------------+----------+ | id | int | | name | varchar | | sex | ENUM | | salary | int | +-------------+----------+ id is the primar leetcode.com update문에 case when절을 사용해본 문제였습니다. 📕 풀이방법 📔 풀이과정 성별..
(SQL) - LeetCode (easy) 620. Not Boring Movies https://leetcode.com/problems/not-boring-movies/description/ Not Boring Movies - LeetCode Can you solve this real interview question? Not Boring Movies - Table: Cinema +----------------+----------+ | Column Name | Type | +----------------+----------+ | id | int | | movie | varchar | | description | varchar | | rating | float | +---------------- leetcode.com where 조건과 order by를 사용해본 문제였습니다. 📕 풀이방..
(SQL) - LeetCode (easy) 619. Biggest Single Number https://leetcode.com/problems/biggest-single-number/description/ Biggest Single Number - LeetCode Can you solve this real interview question? Biggest Single Number - Table: MyNumbers +-------------+------+ | Column Name | Type | +-------------+------+ | num | int | +-------------+------+ There is no primary key for this table. It may contain duplicates leetcode.com group by와 sub query를 사용해본 문제였습..
(C++) - LeetCode (easy) 617. Merge Two Binary Trees https://leetcode.com/problems/merge-two-binary-trees/description/ Merge Two Binary Trees - LeetCode Can you solve this real interview question? Merge Two Binary Trees - You are given two binary trees root1 and root2. Imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to leetcode.com 재귀로 tree를 만드는 문제였습니다. 📕 풀이방법 ..
(SQL) - LeetCode (easy) 610. Triangle Judgement https://leetcode.com/problems/triangle-judgement/description/ Triangle Judgement - LeetCode Can you solve this real interview question? Triangle Judgement - Table: Triangle +-------------+------+ | Column Name | Type | +-------------+------+ | x | int | | y | int | | z | int | +-------------+------+ (x, y, z) is the primary key column for this ta leetcode.com case문을 사용해본 문제였습니다. 📕 풀이방법 📔 풀이과정 삼각..
(SQL) - LeetCode (easy) 607. Sales Person https://leetcode.com/problems/sales-person/description/ Sales Person - LeetCode Can you solve this real interview question? Sales Person - Table: SalesPerson +-----------------+---------+ | Column Name | Type | +-----------------+---------+ | sales_id | int | | name | varchar | | salary | int | | commission_rate | int | | hire_date | leetcode.com 조건절과 in을 사용해본 문제였습니다. 📕 풀이방법 📔 풀이과정 1. order과 com..
(C++) - LeetCode (easy) 605. Can Place Flowers https://leetcode.com/problems/can-place-flowers/description/ Can Place Flowers - LeetCode Can you solve this real interview question? Can Place Flowers - You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent plots. Given an integer array flowerbed containing 0's and 1' leetcode.com simulation 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 1..