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.
Thanks!
In Clojure, the test cases do not check any multiples of 4 that are not powers. Please add
12 false
to the test cases.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Be careful when sorting by raw names. "ABE" would sort before "Aaron", which is incorrect.
Some googling suggests that when you concatenate or take a substring of a Java string, it makes a copy. This takes O(n) time, like iterating over all the characters. Maybe you could avoid this by casting to a char array and then mutating it, but that is not idiomatic to Clojure.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Here's a Clojure translation.
I'd really appreciate if you could review and approve it!
This comment is hidden because it contains spoiler information about the solution
Nice O(n) time!
Worth noting that this takes O(n^2) time, when O(n) is possible.
This comment is hidden because it contains spoiler information about the solution
Loading more items...