๐Ÿ’ซ ETC/Leetcode 28

Week 1-1. [Array / String] 122. Best Time to Buy and Sell Stock II

๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ • โœ๏ธ ๋‚˜๋งŒ์˜ ๋ฐฉ์‹์œผ๋กœ ๋ฌธ์ œ ์ •๋ฆฌํ•˜๊ธฐ (=์ฒด๊ณ„ํ™”) https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/ Best Time to Buy and Sell Stock II - LeetCode Can you solve this real interview question? Best Time to Buy and Sell Stock II - You are given an integer array prices where prices[i] is the price of a given stock on the ith day. On each day, you may decide to buy and/or sell the stock. You can onl..

Week 1-1. [Array / String] 121. Best Time to Buy and Sell Stock

๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ • โœ๏ธ ๋‚˜๋งŒ์˜ ๋ฐฉ์‹์œผ๋กœ ๋ฌธ์ œ ์ •๋ฆฌํ•˜๊ธฐ (=์ฒด๊ณ„ํ™”) https://leetcode.com/problems/best-time-to-buy-and-sell-stock/?envType=study-plan-v2&envId=top-interview-150 Best Time to Buy and Sell Stock - LeetCode Can you solve this real interview question? Best Time to Buy and Sell Stock - You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choo..

Week 1-1. [Array / String] 189. Rotate Array

๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ • โœ๏ธ ๋‚˜๋งŒ์˜ ๋ฐฉ์‹์œผ๋กœ ๋ฌธ์ œ ์ •๋ฆฌํ•˜๊ธฐ (=์ฒด๊ณ„ํ™”) https://leetcode.com/problems/rotate-array/?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..

Week 1-1. [Array / String] 169. Majority Element

๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ • โœ๏ธ ๋‚˜๋งŒ์˜ ๋ฐฉ์‹์œผ๋กœ ๋ฌธ์ œ ์ •๋ฆฌํ•˜๊ธฐ (=์ฒด๊ณ„ํ™”) https://leetcode.com/problems/majority-element/?envType=study-plan-v2&envId=top-interview-150 Majority Element - LeetCode Can you solve this real interview question? Majority Element - Given an array nums of size n, return the majority element. The majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that the majority element al..

Week 1-1. [Array / String] 80. Remove Duplicates from Sorted Array II

๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ • โœ๏ธ ๋‚˜๋งŒ์˜ ๋ฐฉ์‹์œผ๋กœ ๋ฌธ์ œ ์ •๋ฆฌํ•˜๊ธฐ (=์ฒด๊ณ„ํ™”) 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.wikiped..

Week 1-1. [Array / String] 26. Remove Duplicates from Sorted Array

๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ • โœ๏ธ ๋‚˜๋งŒ์˜ ๋ฐฉ์‹์œผ๋กœ ๋ฌธ์ œ ์ •๋ฆฌํ•˜๊ธฐ (=์ฒด๊ณ„ํ™”) https://leetcode.com/problems/remove-duplicates-from-sorted-array/?envType=study-plan-v2&envId=top-interview-150 Remove Duplicates from Sorted Array - LeetCode Can you solve this real interview question? Remove Duplicates from Sorted Array - Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place [https://en.wikipedia.org/wik..

Week 1-1. [Array / String] 27. Remove Element

๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ • โœ๏ธ ๋‚˜๋งŒ์˜ ๋ฐฉ์‹์œผ๋กœ ๋ฌธ์ œ ์ •๋ฆฌํ•˜๊ธฐ (=์ฒด๊ณ„ํ™”) 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 cha..

Week 1-1. [Array / String] 88. Merge Sorted Array

๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ • โœ๏ธ ๋‚˜๋งŒ์˜ ๋ฐฉ์‹์œผ๋กœ ๋ฌธ์ œ ์ •๋ฆฌํ•˜๊ธฐ (=์ฒด๊ณ„ํ™”) 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 respecti..