For time complexity

this video shows time complexity for longest increasing subsequence is 0(N^2) and if we assign to test case then complexity increasing to 0(N^3). how to reduce to it??

Hi @abhisek905

the cases are so desinged that the t test cases complexity is well adjusted

so the complexity of the main algorithm is considered and if u code in O(N^2) for LIS then your code passes all test cases

u can ignore the complexity added by test cases
main is for the algorithm u write

1 Like

I understand it, thanks for it

1 Like

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.