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.
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:
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