Practice Problem
Contains Duplicate II
Difficulty: Easy
Check if an array contains two distinct indices with the same value whose absolute difference is at most k.
Practice Problem
Difficulty: Easy
Check if an array contains two distinct indices with the same value whose absolute difference is at most k.