Basic solution done. Need O(nlogn) algorithm that can work out LIS