there is still an issue here. because the lyrics include this single non-ASCII character, the initial code in C should specify that the expected output encoding is UTF-8. i did it in this fork, pending approval.
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?
there is still an issue here. because the lyrics include this single non-ASCII character, the initial code in C should specify that the expected output encoding is UTF-8. i did it in this fork, pending approval.
Can't you copy/paste it from the description?
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
Loading more items...