Data Structures and Algorithms ยท Techniques

Two pointers

Walking two indices through a sequence at once to avoid a nested loop.

Also known as: fast and slow pointers, left-right pointers.

Start a lesson on Two pointers

Learn first

Leads to

Related topics