Skip to content

Fast and Slow Pointers

The fast and slow pointer approach aka hare and tortoise algorithm, is a two pointer pattern with one pointer moving through the array at a different speed.

Problems of the sort would be where loops are detected in a linked list or an array. Also for problems where you need to find the position of a certain element or the overall length of a linked list.