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.
.
I added some additional info about "what is a hostname" but other than that the above comment stands. I don't see a way to include test cases without giving away the answer. This is in line with many other "puzzle" problems, so I think it's reasonable.
Fun kata. Null byte edge cases were somewhat finicky, but fulfilling to iron out. It'd be fun to set up a fully streaming/piped decoder of this too.
I don't think there's an easy way to add tests without giving away the answers. Do you have an example description that is more descriptive?
Add tests and expand description.
try to expand the equation for the fist few cycles, and you will see how this equation works.
Can you explain the (r - 4) part of this? The solution is extremely elegant, but I don't understand why it works. I understand why division by 2 is necessary, but why subtraction in increments of 4?
Oh, I agree with you. It was useful to have to figure out how to do it in Python 2. Makes me appreciate the innate unicode support of Python 3.
This kata was originally coded for Javascript, which somehow manages to make it easier to work with Unicode than Python 2.x, despite its reputation (which is slowly being shed) for not having much in the way of Unicode support. The purpose of requiring Unicode for this kata is to help the people completing it be able to generalize the algorithm to any set of symbols rather than whatever alphabet they're familiar with. The fact that Python 2.x doesn't make it particularly easy to work with Unicode is something I see as a major flaw in Python 2.x. A lot of places still exclusively use Python 2.x over Python 3 (which are effectively two separate languages to me at this point). Meanwhile, if I'm writing code in any language, knowing how to work with a Unicode format is pretty high up on my list of things I want to know about that language.
This comment is hidden because it contains spoiler information about the solution
Try decoding/encoding the string/your results.
I would make the "it" clear in the failure of the .isEmpty() method test. "CWStack() class should return none if .itsEmpty() is True". Also, True and False should be capped in the instructions.
Thanks. I finally figured out how to make it work, though I think I went about it the wrong way.
Edit: Yea, I did it completely the wrong way. I'll remember that next time!
I am unable to change any tests, as they are locked after a certain number of solutions are submitted.
You're meant to just abbreviate strings of alphabetic characters, so any other characters should be left intact. The whole point of a kata is to write a solution that passes the tests, not to change the tests so that your solution passes. Unless there's an actual bug, then really the onus is on the coder.
If you have problems understanding the kata, or can't figure out what the bug is with your code, feel free to ask those questions.
Can you remove trailing spaces from the tests with multiple words? They're contentless and not part of the kata, but are preventing my algorithm from being confirmed. For instance (I'm creating this example): "bovine-malarky; " is being evaluated for as "b4e-m5y; " so "b4e-m5y;" fails. There's no reason to preserve the trailing space (and the problem doesn't say that you should).
Loading more items...