In the video, the function lis has not been called for smaller subproblems…then how are the answers for smaller subproblems is getting updated??
Longest Increasing Subsequences
in the nested loop we update the answer for subproblem!
we consider after adding ith indexed element to our problem, the inner loop ( j ) calculates LIS ending at a[i].