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.
These tests are checking whether the input list was modified. The kata requires that the original data remains intact and you create a new list.
does your addition change the description on Python, C, Haskell, etc.? or does it appear only on the LC description?
this tests check that you haven't changed the input data. are you returning a new array?
yes, good call. i've added these.
i added a second test for each sample in the random section.
should i add checking for a non-mutated array for all tests?
changed
ah, my apologies for prematurely resolving. thanks for working with me and giving great feedback on my first submitted kata.
i added a clear feedback message for this test.
will not resolve until you validate
fixed :)
ah, i was wondering what the highlighting meant.
thank you, ready to review
good catch, fixed now
added this test case
i also checked that this test catches a mutated list
changed description language to:
Your task is to create a new non-decreasing array that is minimally different from the
data
array. For example, if thedata = [1, 1, 2, 2, 1, 2, 2, 2, 2]
then the returned array should be[1, 1, 2, 2, 2, 2, 2, 2, 2]
becausedata[4] < data[3]
is clearly an error.i'm still not sure how to modify the tests to check that the user returned a new array. do you mean to include a test like the following?
Thanks for your suggestion. I agree with you, but I'm not sure how to impose that the returned array is not mutated in the submission test. Would you please advise?