Ruby 3.0 should be enabled.
Very clever edge cases!
Nice kata but the two different tasks are not really related...
These incorrect Python solutions fail at the random tests sometimes, but pass all the fixed tests. Fixed tests for those cases should be added.
You can print input to debug, or read 4th note.
Anw, this is not an issue.
I keep timing out :(
My script executes in 86ms on an online Python interpreter with this input (937,113,4782,1,456,0,24,7824,13,6985).
Seems quite efficient to me.
What kind of test is taking so long ?
How can I find it ?
You can't use the same number more than once.
3534 only has one 5 but 535 has two 5s
Why for 3534 the largest palindrom is 353, but not 535? 535 bigger then 353.
OK, but some random performance tests (including a bunch of 0s and 1s) could still be added -- see ruby/python.
JS integers have a maximum precision of 2^52, so I'm afraid you might have to nuke the JS version or not care about it ;-)
As the ranking cannot be changed (4 kyu) I turned it into a performance kata. Ruby & python are done, but need some help with JS. @Voile?
Also updated description to be more clear
Added performance tests to ruby and python, js is still lacking.
Added this (plus some other perfomance tests) to all languages: many (most?) of the existing solutions were wiped out...
Just replace his reference solution with one from the solution page that actually works.
Negative numbers are not tested.