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.
Not true. It has a nested loop that is just obfuscated by making it a function. This solution still has O(n^2) time complexity. I am baffled that this solution works when my nearly identical solution kept timing out.
I am a complete noob at this language, meaning I literally just passed this one as my very first Clojure kata (
Completed on 1st Attempt:1
), yay! (and this language totally mysifies me, just had to do some research) So, no it is not broken.You don't use it correctly.
This is not a kata issue: an issue is a bug in the kata, not a difficulty to solve it. I mark your comment with a spoiler flag since it reveals a key to solve the kata. You may need to import something to do what you intent.
Are you sure? Your solution uses two nested loops whereas this solution only uses one.
Let's say
n = 1,000,000
: this solution reads 1,000,000 numbers whereas you examine at most 1,000,000 ^ 2 pairs.Use your favorite editor, then copy-paste into Codewars to run the code.
First of all, I would like to declare:
The following comments are not against you, but for the facts ;-)
The problem you are experiencing is not necessarily a problem for the site. At least I don't often hear users complaining about this.
According to your comments, I have some guesses: