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.
If Rust is okay with it, the math must be correct. Perhaps we've entered another dimension?
Apparently back then if I'm understanding correctly, the kata expected "int[]" to be returned instead of "HashMap<String, int>" despite saying that it needs to be an HashMap. So now, it's fixed but there's still backwards compatibility for "int[]" solutions.
Worth noting that this takes O(n^2) time, when O(n) is possible.
Yeah, mine asked for a HashMap too. And we have the same solutions. I would say we are good. :)
This is weird.. My kata asked for a HashMap as return value.
Maybe I'm watching the solutions of all forks? Anyone knows?
But this solution does not account for negative values... 🤔
I really like this solution
I like how much faster the
strconv.Itoa
operation is thanfmt.Sprint
(according to benchmark at https://gist.github.com/evalphobia/caee1602969a640a4530)