## Rapleaf Interview Question Software Engineer / Developers

• 0
of 0 votes

An Activity to Further Your Gambling Addiction
If you roll 5 standard six-sided dice, what’s the probability that you get at least two 4s?

Also: you were offered the following bet: we pay you \$1003 if you roll at least two 4s but you have to pay Rapleaf \$1003 if you don't. Would you take the bet? Why or why not?

Comment hidden because of low score. Click to expand.
0
of 0 vote

1-P(no_4)-P(only_one_4)= 1-(5/6)^5 - 5*(1/6)*(5/6)^4

if the result is greater than 0.5, just take the bet, otherwise not.

Comment hidden because of low score. Click to expand.
0
of 0 vote

total faces = 30
total faces of 4 = 5
P(no 4)=(30-5)/30= 25/30 = 5/6
P(only one 4) = 1/30

P(at least two 4)=1-P(no 4)-P(only one 4)

P(at least two 4)= 0.13333

Comment hidden because of low score. Click to expand.
0
of 0 vote

no. of dice: 5
no. of faces for each dice: 6
P(at least two 4s)= 1 - (no. of ways of getting exactly one 4)/(total no. of ways)
= 1 - 6^4/6^5
= 5/6

Comment hidden because of low score. Click to expand.
0
of 0 vote

probability of 2 fours = {a = 1/6, b = 5/6, a^5+(a^4 b) 5+a^3 b^2×(5!)/(3! 2!)+a^2 b^3×(5!)/(2! 3!)} = 763/3888

Comment hidden because of low score. Click to expand.
0
of 0 votes

sorry meant at least 2 4s

Comment hidden because of low score. Click to expand.
0
of 0 vote

0.1962 so no bet

Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

### Books

is a comprehensive book walking you through every aspect of getting a job at a top tech company, while focuses on software engineering interviews.

Learn More

### Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

### Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

### Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More