7 kyu
Double Every Other
155 of 7,285Adam-Morris
Loading description...
Fundamentals
Lists
Arrays
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.
Lua translation!
Approved.
Rust translate
LC translation
The kata is very easy for 7kyu. It is can be 8kyu.
This issue is not resolved.
Fixed. I forgot to select Java as the language
The example in the description should be made language-independent.
done
This requirement is not present in any of the languages besides Java, and even there it is not enforced in any way. This note should be removed.
seems to be removed by trashy_incel
Recently approved translations broke the description.
Is it only "Dont mutate the original array." or did you find other discrepancies?
Have you looked at the description? The specifications part isn't working correctly anymore thanks to the Java translation.
fixed
Java translation: https://www.codewars.com/kumite/61dc9d3da303030056478947?sel=61dc9d3da303030056478947. Thanks for revision and approval.
approved
C translation (author inactive)
approved
Julia translation
Approved
JavaScript translation
I approved it and helped you do the work by adding assertion messages ~~ KUDOS !
Thanks! ( I also added failure messages to the fixed tests. )
Could you approve the random tests for Haskell ( below ) as well?
Random tests for Haskell.
Approved. Can you approve this fork of python (update to 3.8) ?
Done by me.
Sorry I was late :P
COBOL translation, with random tests (author inactive).
approved
Forked ruby translation kumited (author inactive) with random tests and camel casing applied :) please review and approve ~~
Some languages do not have random tests.
Only Haskell does not, which is suggested here. Closing.
@Adam-Morris
,This is only the result of a poorly written translation. Passing the same mutable list to two different functions is easily avoidable.
Also, the
Example Test Cases
in this kata go against the Codewars Python Test Reference and testing best practices in general. This pattern (looping through tests) is a bad idea because it doesn't run any of the tests that come after a single test failure.I forked the Python translation and fixed these issues. Here is the kumite.
I only left the "In Python..." warning in the description to make it easier for you to merge. This can (and should) be removed after merging these fixes.
Thanks!
Fixed directly.
I think the random tests are not working. I've passed the basic test easily, but the random tests array expect to multiply every second element by 4. Here is my error message: the list second element: 2093 my returned list: [2827, 4186, -868, 2106, -1845, 1650, 2088, -1964, -1417, -3548, 2779, -2440, 1063, 3352, 1144, -4252, -2431, -3530] should equal [2827, 8372, -868, 4212, -1845, 3300, 2088, -3928, -1417, -7096, 2779, -4880, 1063, 6704, 1144, -8504, -2431, -7060]
Hi, the input list mustn't be modified (see the explanation below). Regards, suic
This comment has been hidden.
Hi, the input list mustn't be modified (see the explation below.). I added it to the description. Regards, suic
Oh, I have seen it, Modified my solution. thank you.
.
Python translation kumited. It includes random 100 random tests. Please review and approve. Thanks, suic
In the tests there's
double_ever_other
instead ofdouble_every_other
.Thanks, it's fixed. Regards, suic
The random tests appear to assume that the list will not be modified in place. If it is a requirement that the list not be modified in place, the instructions should reflect that, or the random tests should be made robust against it so that it's a legal solution.
Hi, the original version of kata is in Haskell which doesn't allow mutability by default. My translation mimics this behavior. I added the a note to the description.
Regards,
suic