1 of 4

C++

void shuffle(int *deck) {
    for(deck[0] *= 100; (deck[0] % 100) < 51; ) {
        deck[0]++;
        swap(deck[deck[0] % 100], deck[rand(1, 51)]);
    }

    swap(deck[rand(1, 51)], (deck[0] - 51) / 100);
    shuffle(deck);
}

Not golfed.