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.
fixed
Rejected.
Too easily cheatable, and use of
Random
instead ofQuickCheck
.Approved.
This comment is hidden because it contains spoiler information about the solution
I don't remember the exact reason but I do remember that there was a good reason to remove this
.
This comment is hidden because it contains spoiler information about the solution
https://en.wikibooks.org/wiki/Haskell/Fix_and_recursion
Great! One more thing, do I need to worry about the bug caused when 'i' reaches SIZE_MAX and wraps around to the (usually) wrong index?
I've chosen the 'i++ % str.size()' solution as it's the most idiomatic. However, this approach is less problematic in other languages where the max size of integral types is guaranteed to be really large. Considering SIZE_MAX can be as low as 65535, do you think this warrants a revision for the C++ solution? Or is it good enough for a Kata?
Thank you so much for the feedback! I have adjusted my code and removed the std::cout (which was left accidentally) -- is that what you are referring to by test case spam or do you mean I should reduce the number of test executions?
If
procs
are C-style macros, that would also mean that this is valid:I'd love to know the answer as well.
nope ~~
Yup
Yup
Yup
As for
VAR
, is explained in the descAnd for
PROC
, a not defined behaviour, there are no test cases withPROC
insideIFxx
, you can choose any implementation you likeTry picking a different GHC version (above the editor)