Skip to content

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.

Where the book teaches it

Related terms

Fast and slow pointersPalindrome