Problem 4 - Largest Palindrome Product

A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers.
The Idea

Since there are only 900 3-digit numbers, checking all possibilities of products of 3 digit numbers gives 9002=810,000900^2 = 810,000 possibilities. To eliminate redundancies, we can check only half (for example 100200=200100100 \cdot 200 = 200 \cdot 100). This leaves 40,500 combinations to be checked. After multiplying each pair, we check to see if it is a palindrome and if the number is greater than the current max palindrome.
The Code

Notes

The full utils module can be found on GitHub here

© Jack Moody 2020