CodingStatistics
Given a function roll() that uniformly returns a double between 0 and 1 and a array/list of numbers of length N (no duplicates), create a function shuffle() that returns a permutation of equal probability
Data Scientist
Meta
Deliveroo
Udacity
eToro
Grammarly
Wealthfront
Try Our AI Interviewer
Prepare for success with realistic, role-specific interview simulations.
Try AI Interview NowInterview question asked to Data Scientists interviewing at Transferwise, Deliveroo, Squarespace and others: Given a function roll() that uniformly returns a double between 0 and 1 and a array/list of numbers of length N (no duplicates), create a function shuffle() that returns a permutation of equal probability.