[이진 검색] 두 배열의 교집합
349 | Intersection of Two Arrays https://leetcode.com/problems/intersection-of-two-arrays/ Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique and you may return the result in any order. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [9,4] Explanat..
2023. 4. 6.
[LeetCode] 300 | Longest Increasing Subsequence
300 | Longest Increasing Subsequence https://leetcode.com/problems/longest-increasing-subsequence/ Given an integer array nums, return the length of the longest strictly increasing subsequence. Example 1: Input: nums = [10,9,2,5,3,7,101,18] Output: 4 Explanation: The longest increasing subsequence is [2,3,7,101], therefore the length is 4. Example 2: Input: nums = [0,1,0,3,2,3] Output: 4 Example..
2023. 3. 31.