human
Longest increasing sub | Function to find the LCS.
Loop to create frequency array.
Driver code"
How can the above be solved in Python?

Write me a code to longest increasing sub and the other steps required?
assistant
#Here is code to longest increasing sub and the other steps required.
 def findLCS ( arr , n ) :
	mp = { }
	for i in range ( n ) :
		if arr [ i ] in mp :
			mp [ arr [ i ] ] += 1
		else :
			mp [ arr [ i ] ] = 1
	return len ( mp )
n = 3
arr = [ 3 , 2 , 1 ]
print ( findLCS ( arr , n ) )