479. Largest Palindrome Product LeetCode Solution | Easy Approach

Minimum Cost to Merge Stones
Share:

Largest Palindrome Product 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

Largest Palindrome Product Solutions

Time: O(n)
Space: O(n)

C++

 Will be updated Soon

Java

 
 Will be updated Soon

Python

  Will be updated Soon

Watch Tutorial

Checkout more Solutions here

Leave a Comment

Your email address will not be published. Required fields are marked *

x