Skip to main content
5 events
when toggle format what by license comment
Apr 4, 2016 at 14:59 comment added 200_success Silly me. If I had remembered what I had written before, I wouldn't have proposed filtering the products instead of filtering the palindromes.
Apr 4, 2016 at 9:27 comment added max taldykin You are right, it could be much slower depending on number of palindromes and actual value of solution (whether it closer to the 999^2 or to the 100^2). Alternative solution has better asymptotic complexity which is not always related to real performance.
Apr 4, 2016 at 8:41 comment added Pigna Thank you! As for the solution you proposed (which is also what 200_success♦ proposed), isn't it slower? I guess it's more idiomatic, but the algorithm is slower. I just timed it with time in terminal. It should even slower with bigger numbers.
Apr 4, 2016 at 8:32 vote accept Pigna
Apr 4, 2016 at 8:13 history answered max taldykin CC BY-SA 3.0