Largest palindrome product: Difference between revisions
Content added Content deleted
m (→{{header|Ring}}: removed library dependence, improved performance by checking hi to low and terminating the inner loop once it's obvious the result won't be improved) |
m (→{{header|Ring}}: keeping it odd) |
||
Line 156: | Line 156: | ||
// the best-found-so-far second number. Doing this |
// the best-found-so-far second number. Doing this |
||
// lowers the iteration count by a lot. |
// lowers the iteration count by a lot. |
||
for m = max to second step - |
for m = max to second step -2 |
||
prod = n * m |
prod = n * m |
||
if isPal(prod) |
if isPal(prod) |