print longest increasing subsequence in nlogn algorithm