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.
Modified the description so it aligns a bit better with the test cases. Sadly, I can't change the test cases to make sense without invalidating 447 solutions.
example test code
?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:
What do you not understand?
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...
The macro was an ugly hack I did mostly due to being upset about the Javaisms of this Kata. I realize now it could have been done better by forwarding the call to my function in a Carboat class, or importing my function to a Carboat namespace.
When I submitted this solution it would come back with compile error if I didn't include that line. The hidden full test suite needed it. The "quick check" tests already included it, so it wasn't that.
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.
Loading more items...