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.
ah, I had something similar. Had the right idea but didn't apply the logic optimally lol
This comment is hidden because it contains spoiler information about the solution
I don't know Clojure at all, but can't you do some kind of type-check where you assess the input before trying to process it?
Doing the challenger in Clojure. I can pass all the tests except sort-odd-random-test. This one throws a java.lang.IllegalArgumentException: Argument must be an integer: error.
Not sure what I am missing.
Now that I'm looking at it, that logic is super flawed. However, in Python, if it's not in the step it won't be included anyway so I needed no additional logic.
It is flawed. The last of the 3 test cases (for Julia at least, not sure if it's the same for other languages) does require you to use the logic in the description.
Wasn't this just about Iterator ? (-_-')
Haskell fork that adds random tests and also updates fixed tests to show inputs upon failure.
Thanks.
This comment is hidden because it contains spoiler information about the solution
This one should fix it
The first array is your output and the second array is the expected output. If you want to see the input that is causing your solution to fail, you should print it yourself. See https://docs.codewars.com/training/troubleshooting#print-input.
In the future, please use the
Question
label when asking for help. See https://docs.codewars.com/training/troubleshooting#post-discourse.Hi,
I failed this test :
expected [ -41, 10, -41, 18, -29, 26, -21, -17, -21, -17, -28, -46, -20, -29, -17, -15, 12, 16, 3, 3, -15, -17, -40, 3 ] to deeply equal [ -41, 10, -29, 18, -21, 26, -17, -17, -15, 3, -28, -46, -20, 3, 3, 9, 12, 16, 11, 29, 35, 39, -40, 41 ]
It looks like the first input array contains extra -45 and second (expected output) array contains 17 instead of this -45
thought it was a weird bug so I had a look. my findings: groovy % is rem not mod
See the issue above.
Loading more items...