Finding the Longest Increasing Subsequence Using Segment Tree
manzzup.blogspot.com