The correct output should be -
3
[9, 10, 11]
Logic fails in the given test case
Sorry length of LIS is right
4 - 5,9,10,11
But dp array was supposed to store the LIS according to video.
Here, dp array contains the wrong/invalid LIS
Sorry length of LIS is right
4 - 5,9,10,11
But dp array was supposed to store the LIS according to video.
Here, dp array contains the wrong/invalid LIS