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.
In Javascript, the tests were not properly working when I pressed the test button. I made sure my function returned the correct value for every test, and still, the test button resulted in the Odd tests working correctly, and the Even tests failing, displaying an error like "isarr is not defined at (line char)" (and isarr is part of the tests).
I viewed other's solutions, and copied and tested their solutions, and got the same exact error. Tried loading the page in another browser to no avail.
Oddly enough, when I clicked the submit button, everything passed. Despite this, clicking test again gave the same error...
I tried to replicate this to copy the exact error here but now it's working fine.
If you haven't seen the movie Aliens, there's a well known scene that perfectly represents this Kata.
In the scene, the Marines are exploring a space colony that's been taken over by the aliens. As everyone's entombed in some alien biological matter, there seems to be no survivors- except for one poor soul, cocooned but barely alive. Upon being woken up, she utters her last desparate words- "Please... Kill... Me." She knows her terrible fate. Her last moments alive are wishing to die, violently convulsing while an alien lifeform bursts forth from her sternum.
The phrase "Kill... Me..." has become pop-culture shorthand for "I am an abomination to both man and god, a violation of the laws of nature and decency so severe that my only wish is an end to my dreadful existence."
If (when?) Katas become self aware, this one will surely beg us for its death.
To the mods here, whoever has the power, I implore you! Put this horrendous beast out of its misery! Spare mankind the disgusting misfortune of ever laying eyes on it again! For the love of all that is good in the world, please KILL THIS KATA!
I really enjoyed this one! I love katas that make you think about how to approach a problem.
Like others, my initial solution timed out, and it took a while to identify the approach that worked.
Without spoiling anything, I can say that thinking through the larger timed-out test cases was what helped me identify where/how the brute force needed to be applied.
(Javascript)
The first time I solved this kata, there was a strange sample test that may be some sort of error.
The test was for input "C". Output was ["ab", "cd", "ef", "g_"]
I wrote a if statement that returned that output for input "C", and it passed.
I went back to the kata just now so I could copy the sample test and list it here, but now the sample test isn't there. Not sure how this happened or how rare it is, but I figured it's worth mentioning.
Otherwise, thanks for the fun kata.
This was a very satisfying Kata.
It took me a LONG time to complete, but for each problem I had with my initial solution, a logical fix emerged.
Challenging without any funky edge cases, thanks.
Nice Kata, challenging but satisfying, without any pesky edge cases. Thanks!
As someone whose last math class was before 9/11, I sometimes feel this way, but not this time!
This was clearly explained, with great examples.
Plus, it was an actual coding challenge, not some Math-trick riddle that's useless in real life.
The description of this Kata remains unclear.
The description asks for a function with three stipulations:
1: the function "returns the sum of a sequence".
2: the sequence "is defined by 3 non-negative values".
3: the function "should returns 0" ... "If begin value is greater than the end".
According to this, in the case of rule 3, the sequence is still valid, and summing it 'should return 0'.
The description could be clearer by asking for a function that "returns the sum of a sequence if begin value is less than end, otherwise returning 0."
Not sure if this contributed to any confusion among the commenters, but I spent time trying to modify my function so that it would still return the sum of the sequence for all tests. Certainly beyond the difficulty of a 7kyu, but should anyone else interpret it literally, hopefully this will save you time.
Gotcha. Thanks again for the quick reply.
Looks like I'll be revisiting this kata again this weekend.
Thanks for the quick reply Chrono!
Some of the solutions still fail similarly, for "*?(]@?( " and "=5!?4!>&".
Are some solutions failing because they're passing in null values?
Or is something going wrong with the tests, like an ES6 discrepancy or something? All of the solutions that have this problem tend to fail one test only.
Thanks in advance for your time/contributions.
If you're having trouble, try working on only 8kyu problems, sorted by 'Most Completed'.
Don't move on until your consistently getting those quickly & first try.
Then work on 7kyu, sorted by "Most Completed."
Then 6, etc.
Issue - Javascript:
The top solution for this Kata doesn't even work!
It fails the test for "|{+(5}6["
Perhaps it has something to do with whatever formatting is going on with those last two characters.
My solution worked in my local repl app, but even after refactoring to no end, it failed that test. I forfeited my honor, only to find that the top solution also fails that test.
I will now retire to bed frustrated, my honor defiled.
You have brought shame upon my clan.