社区 › 研发应用 › [google面试题]Describe an algorithm to output a die roll
亮
发表于 2013-7-30 16:46:45
[google面试题]Describe an algorithm to output a die roll
邢城
发表于 2013-7-30 17:11:59
Sample Answer:Flip the coin three times,and use the three coin flips as the bits of a three‐bit number.If the number is in the range 1 to 6, ,output the number.Otherwise,repeat.