← Amazon questions

Repeating element in window k

Filed under Amazon

Given an integer array `nums` and an integer window size `k`, determine if there exist any duplicate elements within distance `k` of each other (i.e., indices `i` and `j` such that `nums[i] ==…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.