7 kyu
Sweet Dreams are Made of Cheese
218 of 495squidmania
Loading description...
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
python new test framework is required. updated in this fork
Approved
Python: Random tests are vulnerable to input modification
Fixed by OP
Java translation
Ruby 3.0 should be enabled, see this to learn how to do it
Enabled in this fork
C++ 17 should be enabled.
Python, Ruby, Crystal and c++ translations submitted, cheers :)
Thanks for doing these :)
Nice work squeezing in so many cheesy puns!
(I counted 6 - were there more?)
Annie Lennox would be proud of you.
Thanks! I got a little carried away :)
I think you need to clarify about the
rounds up to the nearest hour at the end of the week
bit: it's far from being clear what that means.Hi, I complately agree - I've explained this out a bit more and added an example to help illustrate. Thanks for your feedback :)
This is why you should give user a copy of the generated input, or calculate expected output first, or both ( reference solutions have been known to inadvertently mutate inputs themselves ).
payCheese([...rarr])
will do the trick.Thanks so much for the help! This is my first kata and that's incredibly useful to know - on another note, will be reading through the documentation for
...
on the commute home :)Array.from(rarr)
andrarr.slice()
( look up why there's no arguments ) are functional equivalents of[...rarr]
BTW.[...rarr]
is just the shortest one to write....
and destructuring assignment are fascinating subjects. There's a kata about it as well, but that one's not easy.Kudos on getting your first kata this right. Most people don't.