☑️ 문제(Leetcode): 300. Longest Increasing Subsequencehttps://leetcode.com/problems/longest-increasing-subsequence/description/ ☑️ Code: DP로 풀기class Solution { public int lengthOfLIS(int[] nums) { int answer = 1; int[] dp = new int[nums.length]; dp[0] = 1; for (int i = 1; i = 0; j--) { if (nums[i] > nums[j] && dp[i] 찾아보니, 이분탐색으로 푸는 방법도 있었다.