leetcode/easy3 (LeetCode) 35. Search Insert Position 출처 : https://leetcode.com/problems/search-insert-position/ Search Insert Position - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 방식 하나의 배열이 주어지고 이 배열은 유니크한 정수가 오름차순으로 정렬되어 있음. target 정수를 하나 주고 이 target 이 해당 배열의 어느 위치에 들어갈 수 있는가? 를 구하는 문제이다. 따라서 배열과 타겟이 다음과 같이 주어면 값은 5의 자리인 2(.. 2022. 6. 10. (LeetCode) 26. Remove Duplicates from Sorted Array 출처 : https://leetcode.com/problems/remove-duplicates-from-sorted-array/ Remove Duplicates from Sorted Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 방식 1. 배열이 주어짐 (non-decreasing order) # 이게 사실 increasing이랑 뭐가 다른지 몰랐었는데 찾아보니 알게 되었음. 줄어들지 않음을 중복을 허용함([1,2,2,3]) 증가하는 것은 중.. 2022. 6. 10. (LeetCode) 1. Two Sum 출처 : https://leetcode.com/problems/two-sum/ Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Example 1: Input: nums = [2,7,11,15], target = 9 Output: [0,1] Explanation: Because .. 2022. 6. 10. 이전 1 다음