Stl quiz-2 q3 how O(n^2)?

is the time complexity coming out to be O(n^2) because for each call the vector is being copied to the function? And if not then how is this O(n^2)?

Hi @cs21m014_bac3a0f9c0b24fe7
Kindly share the snapshot of ques u are referring to…

hi @cs21m014_bac3a0f9c0b24fe7
It’s complexity should be O(n) only…

then please correct the answer in the quiz, it is giving O(n^2) as the correct answer.

hi @cs21m014_bac3a0f9c0b24fe7
sure i will inform the team… don’t worry, move ahead with other questions…

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.