Project Euler : Problem 4



Problem

Link to problem page

A palindromic number reads the same both ways. The largest palindrome made from the product of two $2$-digit numbers is $9009 = 91 \times 99$.

Find the largest palindrome made from the product of two $3$-digit numbers.

Solution

Use "inspect source" to see the source code

Explaination

Search all three digit numbers with an efficient ordered set indexing. Convert the product to a string. Check if it is a palindrome. Store the largest palindrome.

Comments

Popular Posts