Why is calculateSum(v, 0) O(n^2)?

Shouldn’t it be O(n)?

hi @shabbirchatrissa_c987d33ad497d50c,
here the vector is being passed by value so everytime u call the function vector of size n is copied and that’s happening for n times so its o(n2)