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.
I should have put a
continue
afterzeros += 1
and movedbreak
out ofmatch _ {_}
I like your solution!
A little advice:
you could leave
res.is_empty() ||
out.Learnt to use
Pair#second
from https://www.codewars.com/kata/reviews/5f37dd44db680500019cd79c/groups/5ffa4b24f0aa1300019d0712This comment is hidden because it contains spoiler information about the solution
tailrec
can be prepended tofun
Yes, it was Groovy.
Thanks!
This comment is hidden because it contains spoiler information about the solution