leetle

Daily challenge for 2026-03-15

439. Distant Neighbors Frequency Match

Given an array of integers nums and an integer k, return true if there exist two distinct indices i and j such that nums[i] == nums[j] and the absolute difference between i and j is at most k. Otherwise, return false.

Example:
Input: nums = [1,2,3,1], k = 3 Output: true

Run this challenge interactively in Python or JavaScript when the app loads.