Hackerrank – Project Euler+ #004 – Largest palindrome product

Hackerrank – Problem description

The problem description – Hackerrank.


We need to find out if the product of two 3-figured number is a palindrome and it is smaller than exercise upper constraint.

My solution starts with initializing two numbers as 999. I continually decremented second number by 1, until it is equal to 100. I calculated the product for each pair. If the product is palindrome and compare it with actual maximum of products.

Repeat the steps until both numbers are equal to 100. The result is actual maximum palindrome number

9992 does not exceed exercise time limit.

I created solution in:

All solutions are also available on my GitHub profile.


Leave a Reply

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