What is complexity of the problem in this video(min substring window)

please correct me its complexity should be n^2 as inside for loop we are using while loop and in worst case it is going to n^2 time .

@kailash_01 hey dont see complexity in that way ,in this question for every character there are two options ki woh us window me insert hoga or delete so n elements ko remove ke lie and n insert ke lie total complexity will be 2n ,think in form of work.

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.