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.
Haskell translation
I've made an attempt at generating random valid inputs. Loops aren't generated due to the complexity of ensuring that they don't loop forever. However, they should serve the purpose of weeding out any hard-coded solutions.
python new test framework + random tests are required. updated in this fork
Could be excellent, but.. returning a const char* is bad c++ practice :-(
This comment is hidden because it contains spoiler information about the solution
tests are not very torough in JavaScript either, I had to add a fixed test to invalidate my solution. It needs more test cases like
[857, 85]
c++ version should use std::string instead of const char*
This requirement is impossible to test. My C solution was able to pass with a fixed 30,000 cells buffer. IMO, this requirement should be removed from the description, or at least marked as a "nice to have".
A quote from Kata Authoring Guidelines:
This comment is hidden because it contains spoiler information about the solution
Ruby 3.0 should be enabled, see this to learn how to do it
Please organize the structure of test fixture as following (although it has been mentioned in the attached link, I'm repeated here again)
The test difficulty is not consistent across all languages: some languages permit brute-force solutions while others only permit the intended ones.
From PEP 8:
AlphaNum_NumAlpha
does not fit into any prevailing naming style. Please change this toalpha_num_num_alpha
or similar.( JS )
Test don't check against input modification.
( They're not vulnerable to input modification, they just don't bite your head off if you do. If brute force should be unallowed ( see below ), I think input modification should be unallowed. )
Nope, there are many ways to calculate pi, some are fast, some are slow
eg. http://numbers.computation.free.fr/Constants/TinyPrograms/tinycodes.html
Your solution is just too slow.
Also, your solution cannot
work with any precision
because it returns afloat
, which cannot represent too many digits.Needs Random Tests.
Nope. It is YOU, the kata author, who are responsible for restricting solutions that should not be passed (according to the desc).
Loading more items...