LeetCode300。最長増加部分列



Leetcode 300 Longest Increasing Subsequence



実行時間:0ミリ秒、最長増加部分列のJavaオンライン送信の100.00%より高速。
メモリ使用量:34.3 MB、最長増加部分列のJavaオンライン送信の89.04%未満。

package LeetCode public class L300_LongestIncresingSubsequence { public int lengthOfLIS(int[] nums) { if(nums.length<1) return 0 int[] tails=new int[nums.length+1] tails[0]=nums[0] int len=1 for(int i=1i