Describe an algorithm to compute the longest increasing subsequence of an array of numbers in O(n log n) time.