Info Edge Interview Question

find LIS , find duplicate in the array