Why is it O(n2)?? It should be O(n)
Ques3 vector quiz
hi @ime_mya we are not passing the vector by reference, therefore we have to make a copy of the entire vector in each call, thus increasing the time complexity.
Why is it O(n2)?? It should be O(n)
hi @ime_mya we are not passing the vector by reference, therefore we have to make a copy of the entire vector in each call, thus increasing the time complexity.