Cards Reordering

Hard mathematics interview practice: Cards Reordering.

Explore this problem with a Quantercise subscription.