Total Accepted: 46925
Total Submissions: 160698
Difficulty: Easy
Given an array of integers and an integer _k_, find out whether there are two distinct indices _i_ and _j_ in the array such that nums[i] = nums[j] and the difference between _i_ and _j_ is at most _k_.
Java:
1 | public class Solution { |