Please explain the correct answer
Answer: A has more time complexity than B
For check1, vector v is passed by value so, a new copy is made.
The cost of copying is O(n)
For check2, vector v is passed by reference so, there is no extra cost of copying.
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.
