알고리즘/LeetCode

    [LeetCode] Longest Common Subsequence (Java)

    ✉️문제 https://leetcode.com/problems/longest-common-subsequence/description/ Longest Common Subsequence - LeetCode Can you solve this real interview question? Longest Common Subsequence - Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0. A subsequence of a string is a new string genera leetcode.com 🗝 문제풀이 2차원 배열을 ..

    [LeetCode] Longest Increasing Subsequence (Java)

    ✉️문제 https://leetcode.com/problems/longest-increasing-subsequence/description/ Longest Increasing Subsequence - LeetCode Can you solve this real interview question? 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 leetcode.com 📝 접근 1. 다이..

    [LeetCode] Non-overlapping Intervals (Java)

    ✉️문제 https://leetcode.com/problems/non-overlapping-intervals/description/ Non-overlapping Intervals - LeetCode Can you solve this real interview question? Non-overlapping Intervals - Given an array of intervals intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. leetcode.com 🗝 문제풀이 겹치는 부분을 최소화..