Please tell the third question of the vector quiz, the time complexity should be O(N), because the recursion call are made N times only.
Quiz Vector STL 3
hello @Sakshi2004
since the vector is being passed by value, it will be copied to a new vector in each call. Copying the vector will take O(n) time, doing so n times will make the overall time complexity of the program as O(n*n)
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.