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.
All other languages have random tests, CS fixed here which is just a direct copy from JS with
chai
assertions (had to tweak down the input range to 50 to prevent buffer overflow still...) , closing ! ^^Fixed in this fork
Fixed in this fork
Fixed in this fork
In Javascript, Node 18 is enabled, but tests don't use chai, causing a deprecation warning on test and attempt.
You are returning a numpy array, but the tests expect you to return a list of lists. They are different data-types and they work differently. The tests are basically comparing your return value to some expected value like this:
your_answer == expected_answer
, and if that expression results inTrue
, you pass the test. When you compare two lists likelist1 == list2
, you get a single boolean such asTrue
once the expression is evaluated. When you compare a numpy array with something likenumpyArray == list
, the result of that expression is another numpy array filled with booleans like this:[True, False, False]
. The tests aren't expecting this, and that's what causes the error.So, you need to not return a numpy array.
This comment is hidden because it contains spoiler information about the solution
not so much guessing, but perhaps extrapolating or deducing...
but anyway, if you've learned about numbers a bit, and you stare at the sample tests critically enough, the formula just leaps out at you
Never written a solver for this before, the answer is just obvious from the sample tests imo.
how is it a spiral even in the instructions?
This comment is hidden because it contains spoiler information about the solution
Thanks for the Kata! Had a lot of fun discovering Go with it :)
Easy yet good to know.
Python new test frame work
Loading more items...