I recently purchased the C++ version of the book. I see that in every code for arrays, a vector is taken as an input instead of arrays. Why is it so?
Also, in problem 5.2, resizing is performed for cases where the number of digits increases. But the main difference between a vector and array is that arrays are of fixed length. Doing the same taking array as an input would increase the space complexity to O(n).
I have seen similar problems for vectors or strings, like adding two numbers. Maybe this is mis-categorized into arrays, or am I missing something here?