Leetcode 384. Shuffle an Array
Design a class that stores an integer array and supports reset (returning the original configuration) and shuffle (returning a uniformly random permutation so that all permutations are equally likely). Expect arrays up to length 50 and up to 10^4 total operations, so use an unbiased shuffling method.
Asked at:
Uber
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late August, 2025
Uber
Senior
A slightly variation of shuffling array, but with an additional step of calculating scores for thousands of iterations, to validate your shuffling algorithm produces equally distributed permutations.
Early April, 2025
Uber
Senior
Your account is free and you can post anonymously if you choose.