668. Kth Smallest Number in Multiplication Table
Last updated
Was this helpful?
Last updated
Was this helpful?
Nearly every one have used the . But could you find out the k-th
smallest number quickly from the multiplication table?
Given the height m
and the length n
of a m * n
Multiplication Table, and a positive integer k
, you need to return the k-th
smallest number in this table.
Example 1:
Example 2:
Note:
The m
and n
will be in the range [1, 30000].
The k
will be in the range [1, m * n]