These incorrect Python solutions fail at the random tests sometimes, but pass all the fixed tests. Fixed tests for those cases should be added. https://www.codewars.com/kata/reviews/557226b6385f599aac0000e2/groups/5fcf8917646b880001ea2f8b https://www.codewars.com/kata/reviews/557226b6385f599aac0000e2/groups/5fcf880d2814a500015cde76 https://www.codewars.com/kata/reviews/557226b6385f599aac0000e2/groups/5fcf8693c8999f00014bc7fb
You can print input to debug, or read 4th note. Anw, this is not an issue.
print input
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
3534
5
535
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.
Cheers
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 ;-)
2^52
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?
@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...
Done.
Meh, again.
Just replace his reference solution with one from the solution page that actually works.
Negative numbers are not tested.
The largest palindrome comes from 15*125 = 1875 -> 8.
Just added a test case similar to that mentioned by you.
These incorrect Python solutions fail at the random tests sometimes, but pass all the fixed tests. Fixed tests for those cases should be added.
https://www.codewars.com/kata/reviews/557226b6385f599aac0000e2/groups/5fcf8917646b880001ea2f8b
https://www.codewars.com/kata/reviews/557226b6385f599aac0000e2/groups/5fcf880d2814a500015cde76
https://www.codewars.com/kata/reviews/557226b6385f599aac0000e2/groups/5fcf8693c8999f00014bc7fb
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 one5
but535
has two5
sWhy 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.
Cheers
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...
Done.
Meh, again.
Just replace his reference solution with one from the solution page that actually works.
Negative numbers are not tested.
The largest palindrome comes from 15*125 = 1875 -> 8.
Just added a test case similar to that mentioned by you.
Loading more items...