''' find lenth Longest increasing subsequence of given array. ''' def lis(a): n=len(a) #initialize ans array same lenth as 1 ans=[1]*n for i in range(1,n): #now compare with first index to that index for j in range(i): if a[i]>a[j] and ans[i]