Search
⌘K

Leetcode 3567. Minimum Absolute Difference in Sliding Submatrix

For each k×k sliding submatrix of an m×n integer grid, compute the smallest absolute difference between any two distinct values; the core challenge is efficiently maintaining the multiset/sorted order (or frequency buckets) of values as the window moves in 2D so you can quickly find the minimal adjacent gap.


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.