Hey there and welcome back now for solving the longest increasing subsequence question.
There is another approach which uses the binary search.
Now over here I am including this solution as well for the sake of completeness, but please do check
out the other video where we discuss binary search in detail.
But in this part we are going to implement the solution with the binary search as well.
And for this approach that we are going to discuss, you could implement the solution with just normal
search.
And remember searching for a value in an array with just normal search by iterating over all the elements
is an O of n operation.
But if we do the search with binary search, we get a better time complexity, which is O of log n.
Now, because binary search has a better time complexity than ordinary search.
Using binary search in this approach will give us a better time complexity.
So let's get started with this approach.