6 kyu
Pile of towels
508 of 957diggi55
Loading description...
Sorting
Algorithms
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.
C translation 🧺 :)
Thank you! Sadly I'm not familiar with C. Hence, looking for feedback :)
Approved
Hi everyone, published a Kotlin translation.
Looking for feedback :)
This comment has been hidden.
and you neither have to sort the arrays but fill the appropriate count of values instead. But I guess than it becomes more verbous (not an expert on Python's syntactic sugar)
Not sure about issue/suggestion, but before there are too many solutions... I think enums should be used wherever appropriate. It's awkward to create copies of 24- or 32-byte objects (hopefully without dynamic allocations) instead or small enums in a performance-oriented language.
This comment has been hidden.
I've just run the whole tests in JavaScript and Python, and I've never received a start pile like the one you say. You must do something wrong.
mutation of the input. The message is using the current version for the input after the call to the user's function.
Fixed the message :)
There's a test with an array full of
t=0
.If you're going to change the description instead of removing the test, it'd be nice if you approved the translations first.
I'm planning on changing the description instead of the test. But how does this adjustment affect your translation?? I'm just curious :)
When you change the description, the translation gets outdated and has to be forked and updated.
When you approve the translation first, it won't be invalidated by your editd to the kata.
Thanks, good to know :)
Done :)
C++ translation. Please, review and approve.
I'm not familiar with C++. Any feedback regarding the translation is welcome :)
:)
Approved :)
Thanks :)
Your random test generator should be slightly improved to generate shorter arrays for weekly_used_towels. (this is accounted for in my JS translation)
Thanks for the translation :)
But why did you generate shorter arrays for weekly_used_towels?? How does it improve the random test??
This isn't meant to be criticism, I simply don't understand it ...
This comment has been hidden.
Done :)
JavaScript translation available.
I will first solve the pending pending issues/suggestions before approving your translation. On top of that, I don't really know JS, so I have to ask someone else to help me out :)
The translation looks good to me :)
Approved :)
Assertions should be placed inside of
@test.it
. You most probably want to change@test.describe(f"{prefix} random test {i + 1}")
to@test.it(f"{prefix} random test {i + 1}")
. Fixed tests could be turned into@test.it
under some common@test.describe("Fixed tests")
or something like this.See this article for more details: https://docs.codewars.com/languages/python/authoring#testing-framework
Done :)
I'd suggest adding some information on inputs somewhere, so users who fail tests would see input arrays immediately and not have to print them by themselves. You could add them to assertion messages, or, if short, to test case titles.
Also test case titled "Empty pile" should be "Half a year without washing", shouldn't it? The pile is not empty, it's just not used?
Added assertion message and picked another case title :)
This comment has been hidden.
Thanks for your response :) I will rework the random test in the next days
Well, that was interesting ...