Jane Street Interview Question

Involved card deck shuffled problem