发表于 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.
页: [1]
查看完整版本: [google面试题]Describe 
an 
algorithm
 to
 output 
a
 die
 roll