in the video sir said that the bruteforce approach will be of O(N^2) but in brutr force approach there will be 2 loops one 0 to n-1 and another i to i+3 so first loop wiil run for n times and for every time the inner loop will run for 3 times so it will be of O(N)
Max elemennt doubt
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.