3 ms·
Choosing the swapped element from the head of the array while traversing backwards is even better: https://gist.github.com/SpComb/b8c722abde2b04a94b14 https://
by terom 11y ago
Choosing the swapped element from the head of the array while traversing backwards is even better:
https://gist.github.com/SpComb/b8c722abde2b04a94b14 https://gist.github.com/SpComb/b8c722abde2b04a94b14
And specific choices of random seed also have some impact :)