← ALL NOTES
Array

2200. Find All K-Distant Indices in an Array

Given nums, a value key, and k: index i is k-distant if some j has nums[j] == key and |i − j| ≤ k. Return all such indices in ascending order. Mark the radius-k neighborhood around each occurrence of…

Loading…