https://leetcode.com/problems/rotate-array/description/?envType=study-plan-v2&envId=top-interview-150 Rotate Array - LeetCode Can you solve this real interview question? Rotate Array - Given an integer array nums, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: nums = [1,2,3,4,5,6,7], k = 3 Output: [5,6,7,1,2,3,4] Explanation: rotate 1 step leetcode.com 📌 - 처..
https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/?envType=study-plan-v2&envId=top-interview-150 Remove Duplicates from Sorted Array II - LeetCode Can you solve this real interview question? Remove Duplicates from Sorted Array II - Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place [https://en.wikipedia.org/wiki/In-place_algorithm] such..
https://leetcode.com/problems/remove-duplicates-from-sorted-array/submissions/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform 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 📌 - 의사코드 📌- 풀이 count를 1로 두고 for문을 수행하면서 이전 배열과 다를 ..
https://leetcode.com/problems/remove-element/?envType=study-plan-v2&envId=top-interview-150 Remove Element - LeetCode Can you solve this real interview question? Remove Element - Given an integer array nums and an integer val, remove all occurrences of val in nums in-place [https://en.wikipedia.org/wiki/In-place_algorithm]. The order of the elements may be changed. Then r leetcode.com 📌 - 처음 생각한..
https://leetcode.com/problems/merge-sorted-array/?envType=study-plan-v2&envId=top-interview-150 Merge Sorted Array - LeetCode Can you solve this real interview question? Merge Sorted Array - You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 an leetcode.com 📌 ..
https://www.acmicpc.net/problem/2343 2343번: 기타 레슨 강토는 자신의 기타 강의 동영상을 블루레이로 만들어 판매하려고 한다. 블루레이에는 총 N개의 강의가 들어가는데, 블루레이를 녹화할 때, 강의의 순서가 바뀌면 안 된다. 순서가 뒤바뀌는 경 www.acmicpc.net 📌 - 처음 생각한 풀이 입력을 받을 때 전체의 합을 더해서, 0~전체의 합의 중간 값을 mid로 사용 start가 end보다 크거나 같아질 때 까지 반복 for문을 돌면서 lay의 값을 증가시켜서 해당하는 갯수가 M보다 큰지 작은 확인 M보다 크면 start를 증가시켜서, lay의 갯수를 줄이도록 함 M보다 작거나 같으면 end를 감소시켜서 lay의 갯수를 맞춤 start의 값을 출력 - 이렇게 풀이..