Info Edge interview question

find LIS , find duplicate in the array