Project Euler/4
From charlesreid1
In this problem, we are asked to find the largest palindrome number that is the product of two three-digit numbers.
This problem has one main task:
- Turning numbers into strings (to check if palindrome)
Normally, Project Euler problems present you with a huge, intractable problem space, and you must spend some time up front eliminating or narrowing down the space you are exploring. But in this case, the key space of all products of all three-digit numbers is trivial to generate, so we do it. Then take the maximum.
Basic structure:
- For each combination of three digit numbers:
- Add the product to a set
- Compute the maximum of the set