4 ms·
the trick for me was to compare i and [i + 2] rather than i and [i + 1]. If you're not sure which card is which, rather than swapping them, move one of them so
by hoorayimhelping 8y ago
the trick for me was to compare i and [i + 2] rather than i and [i + 1]. If you're not sure which card is which, rather than swapping them, move one of them so there's a card between it and the other card.