5.14 solution possible typo?

#1

(1, 0, 2, 3). The second random number is chosen between 1 and 3,
inclusive. Suppose it is 3. We update the array to (1,3,0,2).

When choosing 3, we replace index 1 element with index 3 element.
So shouldn’t we get (1,3,2,0) instead of (1,3,0,2).
Not sure, am I doing something wrong here.

1 Like

#2

I agree. I’ll report a bug.

0 Likes