Find the midpoint of a linked list without using an external buffer
Interview Answers
Anonymous
May 9, 2015
Standard racing problem
Anonymous
Sep 11, 2019
Have 2 pointers: Fast and Slow. Fast pointer moves two nodes at a time. Slow Pointer moves one at a time. Thus by the time, the Fast Pointer reaches the end, Slow would reach the mid point of the linked list