Longest Increasing Subsequence (using Binary Search)

Imagine you have a sequence of numbers like [1, 7, 8, 4, 3, 2]. We want to find the longest possible chain where each number is greater…