Class Solution

  • All Implemented Interfaces:

    
    public final class Solution
    
                        

    479 - Largest Palindrome Product\.

    Hard

    Given an integer n, return the largest palindromic integer that can be represented as the product of two n\-digits integers. Since the answer can be very large, return it modulo 1337.

    Example 1:

    Input: n = 2

    Output: 987 Explanation: 99 x 91 = 9009, 9009 % 1337 = 987

    Example 2:

    Input: n = 1

    Output: 9

    Constraints:

    • 1 <= n <= 8

    • 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 largestPalindrome(Integer n)
      • Methods inherited from class java.lang.Object

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