is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
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.
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.
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.
The condition is handled by the while loop. It has to infinitely loop until the 2 values are unequal. These 2 results are the only 2 that have equal probabilities of occurring.
- Professor Frink January 27, 2016{{
Flip1 Flip2 Probability
Heads Heads p*p
Heads Tails p * (1-p)
Tails Heads (1-p) * p
Tails Tails (1-p) * (1-p)
}}
If the coin is REALLY unfair, then p could be 0.99. p*p is huge, (1-p) * (1-p) is small, but (1-p) * p and p * (p-1) will always have the same probability.
That being said, if you have an incredibly skewed coin, this function could run for a long time.