8 kyu
Reverse List Order
23,896 of 56,504cmgerber
Loading description...
Lists
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.
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/227.
Please join the discussion to help us identify duplicate kata and retire them.
Thanks
This is what 8kyu should be.
C++ Translation
Not all important informations are written in the instructions but partially in the coding area as comment. Maybe I'm not attentive enough but I feel trolled. ;/
This comment has been hidden.
This comment has been hidden.
OP solved it, closing
really simple and basic :)
This comment has been hidden.
First of all, Codewars tests are not created, and are not maintained, by Codewars staff, but by normal users, like you and me. Calling "Codewars staff" on the issue will not help much, and it's not them who created a problem here.
Second thing is, there is this comment in initial code:
Do you know what this means? Do you understand it? Your solution violates this requirement and this is why it does not pass.
Having said that, I agree that feedback of failed tests could be better. I will try to improve the error messages, but you still need to fix your solution.
Not a kata issue. And the error message tells you exactly what you did wrong there.
I see your perspective, but in unit tests context, "random tests" does not exist. From now on, I will just skip the kata random tests.
PHP Translation
Approved
TypeScript translation
Approved
Scala translation
Approved
This comment has been hidden.
Here to say the same.
This comment has been hidden.
Lua translation: https://www.codewars.com/kumite/62bd9974b24b48002967ae0d?sel=62bd9974b24b48002967ae0d
Approved
This kata isn't first that require that you return reverce list. What is the point of similar kata?
Feel free to report them: https://github.com/codewars/content-issues/wiki/List-of-Possible-Duplicate-Kata
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
gracias estaba perdido las funciones no las agarra
This Kata is broken. For the random test it says:
expected [ ... ] to deeply equal []
Language: JS
You were mutating the input. Now it shouldn't matter anymore.
COBOL translation + description made language neutral (author is inactive).
approved
This comment has been hidden.
same problem
don't mutate the list
I'm sure they are a bug, for example 123 >> 321 but what i'm seeing in random numbers like 1597 >> 7519, what going on ? something is wrong
I'd rather bet there is no bug and you're misreading something. Please say which language you're using. We receive a list as an input, not an integer so whatever it is, your message is not accurate. This kata has been completed more than 13000 times since more than 7 years, and nobody complained about such a bug. Maybe this can help you: Troubleshooting Your Solution.
dan 1 thats like a grandMaster, thanks for reply to me xD, can you teach me please what wrong here 5, 4, 3, 1] should equal [4, 5, 1, 3] i'm new to Python and programming so its mostly you are right, but explain to me please
You just need to reverse the list, not sort it. The first element becomes the last element, the second one becomes the second-to-last one, etc.
5, 4, 3, 1] should equal [4, 5, 1, 3] should not it be 1,3,4,5 cause it started 5,4,3,1 why how can it be 4,5,1,3
X should equal Y
means that your function returnedX
, but it should've returnedY
.[5, 4, 3, 1]
isn't the input -- for that case,[3, 1, 5, 4]
is the input.Thanks for help me, My mistake was in sorting the list,When the question only want to reverse it,Stuped mistake but thanks for help me
No, reversing isn't the same as sorting.
Look at the sample tests again -- look at this line:
This means "if you give
[3, 1, 5, 4]
to the functionreverse_list
, the result should be[4, 5, 1, 3]
". When you tried to sort the list, you get the result[5, 4, 3, 1]
instead. The test then tells you[5, 4, 3, 1] should equal [4, 5, 1, 3]
. Your answer didn't match the correct answer.No random test in JS!
For C
Suggesting to silence or remove the many warnings generated by the test fixture. These are all warnings that come with the updated language version. They don't affect Kata completion in any way. It's just aesthetics.
All warnings have been silenced, thanks for the feedback. Please continue the notifications, and use the issue tag as you do, thanks.
No random tests (Python)
Fixed.
This comment has been hidden.
Same question.
This comment has been hidden.
no. Don't mutate the input, it's bad practice.
This kata is a duplicate. Not useful to have so many duplicates.
I appreciated the practice regardless of the skill level. I am still learning python. Thank you.
This comment has been hidden.
Because .Reverse() (as most LINQ functions) do not modify the instance that you are calling it from but instead returns an IEnumerable. You need to do something with that returned value
Description should be updated to include C code-blocks. Something like this (not correct C code, but looks more similar to it than current C# code-blocks):
I have learned that what I should have done was to simply input the language name C as c (lowercase) in the description.
An attempt at changing this was halted with this message: "Description cannot be approved, recent changes from related record must be merged first."
If somone would explain how to handle this, it would be much appreciated!
Are you trying to update the description directly? There's a strange bug when you can get this message in the kata editor, but I haven't heard of any workarounds. Maybe some other user can change the description, idk.
you get that message from the edit panel???!? Or while working on a translation?
it was AFTER FArekkusu had approved it that I noticed the C# examples; not while initially working on an unpublished translation or in an unsaved session.
I suppose I am trying to update the description directly, in the kata editor. I'm just learning how these things work, in fact this was my first translation.
the message comes from either trying to SAVE or PUBLISH after editing the description. it also pops up with this messsage: "Description is shared between all languages."
Replaced with language-agnostic blocks (adhering to current standards)
C translation kumited.
This comment has been hidden.
You might want to specify whether or not the original list is allowed to be mutated by the function.
JS translation description fixed can you accept now? https://www.codewars.com/kumite/556029220863a1bbde0000dc?sel=593835a14504740a49000006
Translated to Javascript