Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- move(fromIndex, toIndex)
- move(2, 0); // [2, 0, 1, 3, 4, 5]
- move(1, 2); // [2, 1, 0, 3, 4, 5] (swapped 2 with 0)
- move(4, 2); // [2, 1, 4, 0, 3, 5]
- move(3, 4); // [2, 1, 4, 3, 0, 5] (swapped 4 with 0)
- move(4, 3); // [2, 1, 4, 0, 3, 5] (swapped 0 with 3)
- move(5, 4); // [2, 1, 4, 0, 5, 3] (swapped 5 with 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement