Tagged in

Two Pointers

Coding Memo
Coding Memo
leetcode solutions and programming notes
More information
Followers
16
Elsewhere
More, on Medium

[Leetcode] Find the Duplicate Number

Use some imagination and then it’s essentially the same as Linked List Cycle II.

Description

Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.