I am not able to get how this code will give longest incresing sequance

I am not able to get how this code will give longest incresing sequance

Hi Harshit… u can refer this https://ide.codingblocks.com/s/576777

in question there is only one loop but in the code given by you 2 loops are present

hi… O(N) soln is not possible for this question… standard soln is O(N^N)… by optimization u can do it in O(NlogN)… i would suggest to go through the videos once again… it would give u better insight…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.