Skip to content

Glossary: Coding Interviews in Go

Two pointers

Also written: pattern 9

Two indexes, `left` at the front and `right` at the back, that move inward through a sorted slice in one O(n) pass using O(1) extra space.

Where the book teaches it

Related terms

PalindromeFast and slow pointersSliding window