Amazon interview question

Coding question 1: Least increasing subsequence