Summary and Takeaway: 1. This problem is similar to detecting a cycle in the linked list.
2. We keep 2 pointers here fast and slow to detect the cycle in the array.
3. Once we detect the cycle we detect the start of the cycle which is the duplicate number.

0 Comments