본문 바로가기

전체 글

(2344)
(C++) - LeetCode (easy) 1108. Defanging an IP Address https://leetcode.com/problems/defanging-an-ip-address/description/ Defanging an IP Address - LeetCode Can you solve this real interview question? Defanging an IP Address - Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". Example 1: Input: address = "1.1.1.1" Outp leetcode.com 문자열을 다뤄보는 문제였습니다. 📕 풀이방법 📔 입력 및..
(C++) - LeetCode (easy) 1103. Distribute Candies to People https://leetcode.com/problems/distribute-candies-to-people/description/ Distribute Candies to People - LeetCode Can you solve this real interview question? Distribute Candies to People - We distribute some number of candies, to a row of n = num_people people in the following way: We then give 1 candy to the first person, 2 candies to the second person, and so on leetcode.com 구현 문제였습니다. 📕 풀이방법 📔 ..
(C++) - LeetCode (easy) 1089. Duplicate Zeros https://leetcode.com/problems/duplicate-zeros/ Duplicate Zeros - LeetCode Can you solve this real interview question? Duplicate Zeros - Given a fixed-length integer array arr, duplicate each occurrence of zero, shifting the remaining elements to the right. Note that elements beyond the length of the original array are not writte leetcode.com 간단 구현 문제였습니다. 📕 풀이방법 📔 풀이과정 정답 vector 변수 ans와 0을 복사해 넣..
(SQL) - LeetCode (easy) 1084. Sales Analysis III https://leetcode.com/problems/sales-analysis-iii/description/ Sales Analysis III - LeetCode Can you solve this real interview question? Sales Analysis III - Table: Product +--------------+---------+ | Column Name | Type | +--------------+---------+ | product_id | int | | product_name | varchar | | unit_price | int | +--------------+---------+ pro leetcode.com join과 group by를 사용해본 문제였습니다. 📕 풀이방법 ..
(C++) - LeetCode (easy) 1078. Occurrences After Bigram https://leetcode.com/problems/occurrences-after-bigram/description/ Occurrences After Bigram - LeetCode Can you solve this real interview question? Occurrences After Bigram - Given two strings first and second, consider occurrences in some text of the form "first second third", where second comes immediately after first, and third comes immediately after sec leetcode.com 문자열을 다루는 문제였습니다. 📕 풀이방법 ..
(SQL) - LeetCode (easy) 1075. Project Employees I https://leetcode.com/problems/project-employees-i/description/ Project Employees I - LeetCode Can you solve this real interview question? Project Employees I - Table: Project +-------------+---------+ | Column Name | Type | +-------------+---------+ | project_id | int | | employee_id | int | +-------------+---------+ (project_id, employee_id) is th leetcode.com 집계함수와 join을 사용해보는 문제였습니다. 📕 풀이방법 📔..
(C++) - LeetCode (easy) 1051. Height Checker https://leetcode.com/problems/height-checker/description/ Height Checker - LeetCode Can you solve this real interview question? Height Checker - A school is trying to take an annual photo of all the students. The students are asked to stand in a single file line in non-decreasing order by height. Let this ordering be represented by the in leetcode.com 정렬을 이용한 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 heights를 복..
(SQL) - LeetCode (easy) 1068. Product Sales Analysis I https://leetcode.com/problems/product-sales-analysis-i/ Product Sales Analysis I - LeetCode Can you solve this real interview question? Product Sales Analysis I - Table: Sales +-------------+-------+ | Column Name | Type | +-------------+-------+ | sale_id | int | | product_id | int | | year | int | | quantity | int | | price | int | +----------- leetcode.com join을 사용해보는 문제였습니다. 📕 풀이방법 📔 풀이과정 1...