Statement
Write containsNearbyDuplicate(nums, k): return true if there are two different positions i and j holding the same number and at most k apart (|i − j| ≤ k). k can be 0. The list can hold 100,000 numbers and k can be big.
Write containsNearbyDuplicate(nums, k): return true if there are two different positions i and j holding the same number and at most k apart (|i − j| ≤ k). k can be 0. The list can hold 100,000 numbers and k can be big.
Write containsNearbyDuplicate(nums, k): return true if there are two different positions i and j holding the same number and at most k apart (|i − j| ≤ k). k can be 0. The list can hold 100,000 numbers and k can be big.