Fast And Slow Pointers

Pasted image 20221226172139.png

Normally fast pointer can go 2x than slow pointer. Useful when dealing with cyclic linked list

Ways to identity

  • Dealing with a loop in linkedlist or array Floyd's Loop detection
  • Identify a position of an element in the array