668. Kth Smallest Number in Multiplication Table
Nearly every one have used the Multiplication Table. 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
andn
will be in the range [1, 30000].The
k
will be in the range [1, m * n]
Last updated
Was this helpful?