Today I was presented with this question:
Given the digits 1 - 9 inclusive, using each digit once and only once, arrange them to form two numbers such that the square of one number equals the other number.
There are two solutions to this problem. Find them both.
I searched on Google and found the answers, but I have not found the solution (algorithm). Any ideas on how this would be achieved?