Class Solution

  • All Implemented Interfaces:

    
    public final class Solution
    
                        

    668 - Kth Smallest Number in Multiplication Table\.

    Hard

    Nearly everyone has used the Multiplication Table. The multiplication table of size m x n is an integer matrix mat where mat[i][j] == i * j ( 1-indexed ).

    Given three integers m, n, and k, return the <code>k<sup>th</sup></code> smallest element in the m x n multiplication table.

    Example 1:

    Input: m = 3, n = 3, k = 5

    Output: 3

    Explanation: The 5<sup>th</sup> smallest number is 3.

    Example 2:

    Input: m = 2, n = 3, k = 6

    Output: 6

    Explanation: The 6<sup>th</sup> smallest number is 6.

    Constraints:

    • <code>1 <= m, n <= 3 * 10<sup>4</sup></code>

    • 1 &lt;= k &lt;= m * n

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Solution()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Integer findKthNumber(Integer m, Integer n, Integer k)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait