Search
⌘K

Leetcode 1439. Find the Kth Smallest Sum of a Matrix With Sorted Rows

Given an m×n matrix whose rows are sorted, pick exactly one element from each row and return the k-th smallest possible total sum; the challenge is to avoid enumerating the exponential (n^m) combinations by exploiting row order and the small k (≤200) via techniques like iteratively merging rows keeping only k smallest sums or binary-search-with-pruned counting.


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.