Ad
  • Custom User Avatar
  • Custom User Avatar

    How can 0 become 6, I thought it should be 4.

    If we follow the path of the 6, we see it ends up at the 0 position, below:

    EDIT: pasted an image because the Discourse section, though it renders HTML code fine in the preview, will not show it as the actual comment.
    EDIT #2: Each index value of the returned list/array should be occupied by the number that arrives at that position. The '6' value, after swapping all of its positions, arrives at the 0 index slot.