Algorithm/LeetCode

Algorithm/LeetCode

26. Remove Duplicates from Sorted Array

26. Remove Duplicates from Sorted Array Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order of the elements should be kept the same. Then return the number of unique elements in nums. Consider the number of unique elements of nums to be k, to get accepted, you need to do the following thing..

Algorithm/LeetCode

1. Two Sum

1. 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 nums[0] + nums[1] == 9, we return ..

Algorithm/LeetCode

1929. Concatenation of Array

1929. Concatenation of Array Given an integer array numsof length n, you want to create an array ans of length 2n where ans[i] == nums[i] and ans[i + n] == nums[i] for 0

Sheep1sik
'Algorithm/LeetCode' 카테고리의 글 목록