Statistics

Let's say you have a dice with X sides. Each side has a different probability of landing. Implement an algoirthm that simulates the rolling of the dice a given number of times.

Data Scientist

Zalora

Chime

Tinder

Citrix

thredUP

Ironclad

Did you come across this question in an interview?

Your answer

Answers

Unlock Community Insights

Contribute your knowledge to access all answers

#Give&Take - Share to unlock

Try Free AI Interview

Google logo

Google

Product Manager

Prepare for success with realistic, role-specific interview simulations.

Product Strategy
Meta logo

Meta

Product Manager

Prepare for success with realistic, role-specific interview simulations.

Product Sense
Meta logo

Meta

Engineering Manager

Prepare for success with realistic, role-specific interview simulations.

System Design
Amazon logo

Amazon

Data Scientist

Prepare for success with realistic, role-specific interview simulations.

Behavioral
  • Let's say you have a dice with X sides. Each side has a different probability of landing. Implement an algoirthm that simulates the rolling of the dice a given number of times.
  • How would you program an algorithm to simulate the roll of a non-uniform X-sided dice?
  • Can you devise an algorithm that replicates the rolling of an X-sided dice with varying probabilities?
  • How can you create an algorithm to model the outcome of a biased X-sided dice roll multiple times?
  • Could you develop an algorithm to emulate rolling an X-sided dice with distinct probabilities for each side?
  • Would you be able to construct an algorithm for simulating an X-sided dice roll considering different side probabilities?
  • Can you formulate an algorithm to simulate a weighted roll of an X-sided dice?
  • How would you approach writing an algorithm for an X-sided dice where each face has a unique landing probability?
  • Show how you would implement an algorithm to mimic the toss of an X-sided dice with specific probabilities.
  • How do you generate an algorithm that simulates rolling a dice with X sides, with each side having a non-uniform chance of landing?
  • Let's say you have a dice with X sides. Each side has a different probability of landing. Implement an algorithm that simulates the rolling of the dice a given number of times.

Interview question asked to Data Scientists interviewing at Zalora, Redfin, Figma and others: Let's say you have a dice with X sides. Each side has a different probability of landing. Implement an algoirthm that simulates the rolling of the dice a given number of times..