Glossary: Coding Interviews in C++
Sort first
A pattern where sorting puts related items next to each other, so comparing neighbors answers "closest", "duplicates" or "group together" questions. It costs O(n log n).
Glossary: Coding Interviews in C++
A pattern where sorting puts related items next to each other, so comparing neighbors answers "closest", "duplicates" or "group together" questions. It costs O(n log n).