Infosys interview question

DSA : Longest Increasing subsequence