As reported: CrowdStrike SDE-III, Falcon Exposure Management (2026), round 2 (technical, with a senior engineer): given a list of numbers, generate a permutation such that every permutation is equally likely (a uniform shuffle). The same round covered security fundamentals.
Implement the Solution class. This is LeetCode 384 — Shuffle an Array:
Solution(nums)— store the array.reset()— return the array in its original order.shuffle()— return a random shuffle of the array; all permutations must be equally likely.
Example
["Solution","shuffle","reset","shuffle"]
[[[1,2,3]],[],[],[]]
-> [null,[3,1,2],[1,2,3],[1,3,2]] (any uniformly random permutations)
Constraints: 1 ≤ nums.length ≤ 50; elements are unique; at most 10^4 calls.
Code runner format: two lines, LeetCode's format: the list of operations (starting with "Solution"), then the list of their argument lists. Implement the class Solution with reset and shuffle; the harness prints the list of return values (null for methods that return nothing). The harness checks that every result is a permutation and that, over many shuffles, every value lands at every index about equally often, then prints "ok".