Arrays

Contains Duplicate II

easy
Given an integer array `nums` and an integer `k`, return `true` if there are two distinct indices i and j such that `nums[i] === nums[j]` and `abs(i - j) <= k`.
Hint steps(0/1 revealed)
  1. 1

    Complete previous step or reveal to unlock this hint.