This is for the Daily Coding Challenge for 2025-10-31
The second bullet point is confusing about the casing of the resulting letters. It reads:
Capitalize the first letter of the string, and every other letter after that, ignore the tilde character when counting.
It only talks about changing the case of a character to upper (or “capitalize”) for the first and every other character afterwards (except ignoring the tilde '~'character when counting). The example provided (which is test 1) doesn’t have a problem, since all of the characters are lower case. However, tests 3 and 5 have upper case characters that are changed to lower case.
Am I missing something? I expect test 3 to have the output of:
"TRICK~oR~TREAT" not "TrIcK~oR~tReAt", since the instructions didn’t say anything about switching between upper and lower cases in the output. If this was the intention, I suggest that the second bullet point be changed to (emphasis added to show additional sentence):
Capitalize the first letter of the string, and every other letter after that, ignore the tilde character when counting. If a character is not to be capitalized, then change it to lower case.
Then for the example, it should be changed to:
For example, given
hElLo_World, returnHeLlO~wOrLd.
I didn’t see an issue on GitHub, but I would gladly do so if this was the intent. Thanks!