Beta
Rotate Right
27AlamarW
Loading description...
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.
Hi,
Unfortunately, that's a duplicate (and there are probably more out there).
The function name should be changed because otherwise it's completely misleading / confusing / inaccurate, as there is no mention of shuffling in the description and no actual shuffling required or expected within the algorithm.
To nonetheless prevent invalidation of the solutions submitted so far, you may implement this code in your test suite:
...optionally, because it's still in beta, you could stil simply consider a more apt kata title (such as)
Bookending Arrays
with a function name of bookend_array.In the example and submit tests,
it
title contains two times the wordreturn
.it
title saysfalse
instead ofNone
.The description says to first rotate the array, then check if it's bookended.
The tests however require the array to be returned as is if it's already bookended without rotation
move each element to the right -> in which order ? Tbh, I don't understand anything at all of this spec. If this is the current standard of a good description, I'm tuning out.
I made some adjustments based on your feedback. I hope with the adjustments I made to the feedback that it's more clear what I want people to try and do. I also changed the title to this Kata to reflect this clarity.
Yes, much better. Although, only the examples show to pick elements from the right. I've been going through the array from left to right all the time, moving elements to the right.
False
if the array can't be shuffled.None
would be more suitable.Thanks for the feedback. I agree with returning
None
rather thanFalse
and I implemented random tests.I don't see the changes. Did you republish?
Should be up now