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.
Glossary: Coding Interviews in Go
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.