package test.leecode.array; import org.junit.Assert; import org.junit.Test; import cn.fansunion.leecode.array.max.LongestContinuousIncreasingSubsequence; /** * @author wen.lei@brgroup.com * * 2022-2-25 */ public class LongestContinuousIncreasingSubsequenceTest @Test public void test() LongestContinuousIncreasingSubsequence test = new LongestContinuousIncreasingSubsequence(); Assert.assertEquals( 3 , test.findLengthOfLCIS( new int [] 1 , 3 , 5 , 4 , 7 )); Assert.assertEquals( 1 , test.findLengthOfLCIS( new int [] 1 , 1 , 1 , 1 )); Assert.assertEquals( 2 , test.findLengthOfLCIS( new int [] 1 , 3 , 2 , 4 , 3 )); Assert.assertEquals( 5 , test.findLengthOfLCIS( new int [] 1 , 3 , 5 , 4 , 7 , 8 , 9 , 10 )); Assert.assertEquals( 6 , test.findLengthOfLCIS( new int [] 1 , 2 , 3 , 5 , 9 , 10 ));
|