replace the recursive merge sort implementation with an interative one.
an O(n lg n)-time algorithm for the LIS problem.

fix the binary_search()
Rabin–Karp algorithm

Rolling hash