Find unbiased decision out of a biased coin | Technical interview solutions
You are given a function foo() that represents a biased coin. When foo() is called, it returns 0 with 60% probability, and 1 with 40% probability. Write a new function that returns 0 and 1 with 50% probability each. Your function should use only foo(), no other library method.Read full article from Find unbiased decision out of a biased coin | Technical interview solutions
No comments:
Post a Comment