Ad
  • Custom User Avatar

    Hi,

    Unfortunately, that's a duplicate (and there are probably more out there).

  • Custom User Avatar

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

  • Custom User Avatar

    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:

    try:
        from solution import shuffle_right as rotate_right
    except ImportError:
        from solution import rotate_right
    
  • Custom User Avatar

    In the example and submit tests,

    • the second it title contains two times the word return.
    • The fourth it title says false instead of None.
  • Custom User Avatar

    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.

  • Custom User Avatar

    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

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Should be up now

  • Custom User Avatar

    I don't see the changes. Did you republish?

  • Custom User Avatar

    Thanks for the feedback. I agree with returning None rather than False and I implemented random tests.

  • Custom User Avatar
    • needs random tests
    • I'm not sure I agree with a return of False if the array can't be shuffled. None would be more suitable.