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.
You're right. I corrected this mistake and all JS tests passed. Thank you for your help.
You're using the built-in function in line 2 incorrectly.
no issue here. The
const
modifier tells you that you should not mutate the array. You can decide to write bad code and do it anyways, it's not the tests suite's concernThank you for your answer. I guess there is something wrong with my JS solution then.
Both seem fine to me. I just passed on both with very similar solutions.
I was expecting the supplied data not to be mutable. But as I wrote I'm not sure how it was intended.
I am not sure I understand the issue, and when I am trying to sort the input array I get an expected warning:
What would be the behavior expected by you? Do you mean that it should be generally not allowed to mutate inputs in this kata?
For the C version.
The function is defined as
However, the data pointed to by gifts is still mutable, i.e you don't need to make a copy in order to sort.
Marked as issue as I'm not sure what was intended.
approved by someone
C Translation
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/151.
Please join the discussion to help us identify duplicate kata and retire them.
approved
Really sorry, I marked the issue resolved when I wanted to put the spoiler flag on my comment... Feel free to reraise an issue if you feel like.
This comment is hidden because it contains spoiler information about the solution
Loading more items...