Implicit-linked-list

1 articles

dsa10 min read

Find the Duplicate Number — Floyd's Cycle Detection on an Array

LC 287 Find the Duplicate Number is a brilliant medium interview problem at Amazon, Google, and Facebook where you find a duplicate in an n+1 integer array in O(1) space by treating the array as an implicit linked list and applying Floyd's cycle detection algorithm. Master the connection between arrays and linked lists with Python and JavaScript solutions and detailed proof.

Read →