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.
Gee I'm so relieved at least ONE other person knows how to use (or write) clamp and abstracting away pixel access/manipulation a bit. +1
C++ version requires very spotty error checking. E.g. trailing garbage at the end is simply to be ignored (WTF) UNLESS (found empirically) it starts with ')', '|' or '*'.
It could be that more arbitrary continuation characters should trigger parse failures, but I happened to not hit them with the random test cases I received.
Please, let's make sure that katas teach PROPER programming principles, such as:
The test cases testing for exception in C++ are wrong:
The description clearly states that
I'd expect the function to throw at the second guess, or MAYBE at the first next WRONG guess. Not at the third guess when that guess is actually correct
what the actual...
May well be the only person to use regex here :)
And arrogance. "XXX people completed the kata" doesn't (at all) mean it's above criticism. It just means all code warriors have stamina and pitbull mentality.
Which is great, because programmers need that.
Translating that to "my description is perfect" is just nonsense. Ironically, a programmer with good sense of logic would realize that. But that programmer would read the question the way we all did, as opposed to how the author reads it.
I get your frustration. I too read the problem in the "sensible way". Just accept that it wasn't intended to have any real-life useful meaning, and it's basically a sequence-manipulation trick. Either bit the bullet or skip the kata (I wouldn't blame you, it's just my OCD keeping me here)
The wording "Furthermore the percent of loss [...]" clearly implies that it only goes for the depreciation of the OLD car, not the new (that's a WIN, not a LOSS)
is WAY more accurate. (thanks to designerzim)
Indeed, especially
is WAY more accurate. I'm filing an issue because "Furthermore the percent of loss" clearly implies that it only goes for the depreciation of the OLD car, not the new (that's a WIN, not a LOSS)
Good style. Consider using a proper random generator (std::mt19937 e.g.)
@g964 of course it is. Changing the parameters of my compare predicate to int16_t very much makes the tests fail due to overflow.
randomized tests could mean the test "passes" by accident (because it doesn't hit the edge case that fails)
This is one of the rare cases that work in-place.
Also, I think most answers get the dimension detection on decode wrong in the general case (though I'm not in the mood to check)
Huh. Interesting. What are you using
isPrime
for here?What a royal mess this is. I even left in my debug traces. Bad kata.
Loading more items...