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.
no problem that's why I write them
yep
Flagged as spoiler for you. Remember that this site exists for programmers to learn both the advanced concepts and the fundamental algorithms, and looking up appropriate documents on their own is a skill to be trained.
And waste that many seconds writing such unnecessary code to bog up the codebase? Don't quit your day job.
Thankfully the tests don't test for "sample", which is good because the behavior of the function when text is in the array isn't specified anyways, so assuming they are truthy is the only sane way to go.
Because that doesn't do what the problem requires.
Weeeee
-0 is 0. Do you know what the word "bug" means? It means when actual behavior fails to match expected behavior, which is not the case here.
-0 is 0
This comment is hidden because it contains spoiler information about the solution
Anything can be exploited, that's why we have multiple tests. Kata translations can have their own way of testing for solutions to work but if you haven't done at least what the original is testing for then you haven't translated a kata, you've just written your own and should had posted it as your own.
Your random tests in your test case only asserts that random indices match your expected indices, it doesn't check for segments to hold the fibonacci sequences property: c(n) + c(n+1) == c(n+2).
When writing real code, clarity is the most important rule in practice, beyond doing smart tricks. You do NOT need to use bitwise operations in non-bitwise-based logic. We only did it because we're used to code golfing.
This comment is hidden because it contains spoiler information about the solution
I am not sure how to handle drastic changes like these. Do you think this is a necessary change to sustain the integrity of the kata?
Loading more items...