ConsultAdd interview question

Dsa question on Longest increasing subsequence