Search
⌘K

Leetcode 2903. Find Indices With Index and Value Difference I

Find any pair of indices i, j such that abs(i - j) >= indexDifference and abs(nums[i] - nums[j]) >= valueDifference, returning [i, j] if found or [-1, -1] otherwise. With n ≤ 100, a straightforward pairwise search is sufficient.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.