Skip to content

Glossary: Coding Interviews in C++

const reference

Also written: const std::vector<int>&, pass by reference

A parameter written like `const std::vector<int>&` that avoids copying the vector and promises not to change it. Passing by value instead gives the function its own copy to modify.

Where the book teaches it

Related terms

Vector copy