Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Ha, have an upvote for perseverance :-)
Better first filter, then sort.
I hope it will be OK :-)
It took me almost a month working on this one of and on, I would say it is more than 5 kyu haha. But i learned a lot.
This one was very fun! I tried very hard to get my regex to match all cases and then to refactor it, but when I finally saw other solutions I realized I have a lot more to learn, lol.
fixed initial code
the function name in the initial code is still
to_PTR
Duplicate as noted below. And the addition of some trivial string operations doesn't change anything.
Thanks! I updated the Kata to follow Python convention :)
Hi! I had seen that Kata, but I think the addition of string manipulation at the end made it different enough.
Looks like a duplicate. It's the same as the following kata, except appending a string for valid cases: https://www.codewars.com/kata/515decfd9dcfc23bb6000006
My first solution took 30 seconds for $n = 1200, but bit by bit I managed to improve to get $n = 4000 near 100ms and that was enough, phew.
Very nice kata, I learned a lot!!