Shuffle an Array — Randomized

Build a small deck that can randomly reorder its cards with every ordering equally likely, and restore its original order on request.

Randomized · Medium

More in Randomized

All algorithm problems