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, it's not. It's
O(32*n)
.Why didn't I think of this!?
Same problem as mwaltersva
This comment is hidden because it contains spoiler information about the solution
Really nice Kata! Upvoted!
Doesn't matter. The whole idea is to improve yourself. If their solution is cleaner or faster, learn why and try that in another Kata. And often the solutions that are the shortest aren't easily readable or perform the quickest.
12,000ms! Is that just for Java? You could put the array length in a variable before the loop. Then it won't have to check during the loop condition.