human
Longest Increasing Subsequence | DP | lis returns length of the longest increasing subsequence in arr of size n.
Declare the list ( array ) for LIS and initialize LIS values for all indexes.
Compute optimized LIS values in bottom up manner.
Initialize maximum to 0 to get the maximum of all LIS.
Pick maximum of all LIS values.
Driver program to test above function"
Solution in Python:
 ... Give me a code to longest Increasing Subsequence and the other steps required?
assistant
#Here is code to longest Increasing Subsequence and the other steps required.
 def lis ( arr ) :
	n = len ( arr )
	lis = [ 1 ] * n
	for i in range ( 1 , n ) :
		for j in range ( 0 , i ) :
			if arr [ i ] > arr [ j ] and lis [ i ] < lis [ j ] + 1 :
				lis [ i ] = lis [ j ] + 1
	maximum = 0
	for i in range ( n ) :
		maximum = max ( maximum , lis [ i ] )
	return maximum
arr = [ 10 , 22 , 9 , 33 , 21 , 50 , 41 , 60 ]
print " Length ▁ of ▁ lis ▁ is " , lis ( arr )