fix bug and implemented Longest Increasing Subsequence algorithm with running time O(nlogn)