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.
No mutable! Congratulations!
https://www.codewars.com/kumite/5ec5371d6783df002f741ff4?sel=5ec53a15b82876000f30e8ff ;-)
With a
match
, it could even shorter !I use
panic
as exit when there is no solution (could beNone
if the output isOption
)This comment is hidden because it contains spoiler information about the solution
I tried to do something that could be adaptable to do "sum of three (and more)"
(just increase
max_occurence
to 3 and updatenaive
algo with another naive algo for small sets).