Question
Back to all questions

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

Tags

Data Analyst
Marketer
General
Coding

Consider implementing Fisher-Yates shuffle algorithm, using the roll() function to generate random indices with equal probability.

Companies Asking this quesiton.

Very hard Difficulty

Very-hard questions are the ultimate test of your expertise and preparation. They demand not just knowledge, but creativity and strategic thinking, often addressing unique or highly technical aspects of your field.

Coding question

Coding questions assess your programming abilities and thought process. Showcase your problem-solving approach, coding style, knowledge of data structures, and ability to write clean, efficient, and maintainable code.

Leaderboard for Implementing a Uniform Shuffle Function?”