pass a vector to a function code example
Example: c++ passing vector to function
// Pass by value
void print(std::vector<int> arr) { }
// Pass by reference
void print(std::vector<int>& arr) { }
// Pass by value
void print(std::vector<int> arr) { }
// Pass by reference
void print(std::vector<int>& arr) { }