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.
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!!
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
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.
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!!