Longest Increasing Subsequence Simple Submission

programming
Tags: #<Tag:0x00007f1824b963b8>

#1

def lis(self, A):
n=len(A)
S=[1 for i in range(n)]
for i in range(1,n):
for j in range(0,i):
if A[i]>A[j]:
if(S[j] + 1 > S[i]):
S[i] = S[j] + 1;
return max(S)