Glossary: Coding Interviews in Rust
Two pointers
Also written: two-pointer
Keeping two indexes, `left` and `right`, into one sorted list and moving one inward each step until they meet. It is one O(n) pass with O(1) extra space.
Glossary: Coding Interviews in Rust
Also written: two-pointer
Keeping two indexes, `left` and `right`, into one sorted list and moving one inward each step until they meet. It is one O(n) pass with O(1) extra space.