小公司店面,面经分享# JobHunting - 待字闺中
d*l
1 楼
小烙印面试,烙印的口语真不好懂。
collabedit 上做题,题目是:
say we have a function named int badHeadsOrTails(), which returns 0 (60% of
the tiime), and return 1 (40% of the time).
Now, write a function - int goodHeadsOrTails(), which will return 0 or 1(
each 50% of the time), only using badHeadsOrTails() as the sole source of
randomness.
10分钟后,做出来了,独立事件概率。
还剩时间,烙印说,我再给你第二道看看,在屏幕上写出 check string is
palindrome..用 while loop。
collabedit 上做题,题目是:
say we have a function named int badHeadsOrTails(), which returns 0 (60% of
the tiime), and return 1 (40% of the time).
Now, write a function - int goodHeadsOrTails(), which will return 0 or 1(
each 50% of the time), only using badHeadsOrTails() as the sole source of
randomness.
10分钟后,做出来了,独立事件概率。
还剩时间,烙印说,我再给你第二道看看,在屏幕上写出 check string is
palindrome..用 while loop。