所属:生活杂谈 阅读:3384 次 评论:7 条 [我要评论]  [+我要收藏]


While many companies, including Google and Microsoft, have policies banning brain teas-ers, interviewers still sometimes ask these tricky questions   This is especially true since peo-ple have different definitions of brain teasers

Advice on Approaching Brain Teasers

Don’t panic when you get a brain teaser   Interviewers want to see how you tackle a problem;they don’t expect you to immediately know the answer. Start talking, and show the inter-viewer how you approach a problem.In many cases, you will also find that the brain teasers have some connection back to funda- mental laws or theories of computer science.

If you’re stuck, we recommend simplifying the problem   Solve it for a small number of itemsor a special case, and then see if you can generalize it.


You are trying to cook an egg for exactly fifteen minutes, but instead of a timer, you are giventwo ropes which burn for exactly 1 hour each   The ropes, however, are of uneven densities -i e , half the rope length-wise might take only two minutes to burn.

The Approach

1    What is important? Numbers usually have a meaning behind them.The fifteen minutesand two ropes were picked for a reason

2    Simplify!  You can easily time one hour (burn just one rope)

3    Now, can you time 30 minutes?  That’s half the time it takes to burn one rope. Can youburn the rope twice as fast?  Yes!  (Light the rope at both ends )

4    You’ve now learned: (1) You can time 30 minutes  (2) You can burn a rope that takes Xminutes in just X/2 minutes by lighting both ends.

5    Work backwards: if you had a rope of burn-length 30 minutes, that would let you time15 minutes. Can you remove 30 minutes of burn-time from a rope?

6    You can remove 30 minutes of burn-time from Rope #2 by lighting Rope #1 at bothends and Rope #2 at one end.

7    Now that you have Rope #2 at burn-length 30 minutes, start cooking the egg and light

Rope #2 at the other end  When Rope #2 burns up, your egg is done!

6 1  Add arithmetic operators (plus, minus, times, divide) to make the following expres-sion true: 3 1 3 6 = 8. You can use any parentheses you’d like.

6 2  There is an 8x8 chess board in which two diagonally opposite corners have been cutoff  You are given 31 dominos, and a single domino can cover exactly two squaresCan you use the 31 dominos to cover the entire board? Prove your answer (by provid-ing an example, or showing why it’s impossible)

6 3  You have a five quart jug and a three quart jug, and an unlimited supply of water(but no measuring cups)   How would you come up with exactly four quarts of water?

NOTE: The jugs are oddly shaped, such that filling up exactly ‘half’ of the jug wouldbe impossible

6 4  A   bunch   of   men   are   on   an   island   A   genie   comes   down   and   gathers   everyone   to-gether and places a magical hat on some people’s heads (i e , at least one person hasa hat)  The hat is magical: it can be seen by other people, but not by the wearer ofthe hat himself  To remove the hat, those (and only those who have a hat) must dunkthemselves underwater at exactly midnight           If there are n people and c hats, howlong does it take the men to remove the hats?  The men cannot tell each other (in anyway) that they have a hat

FOLLOW UPProve that your solution is correct

6 5  There is a building of 100 floors.If an egg drops from the Nth floor or above it willbreak   If it’s dropped from any floor below, it will not break  You’re given 2 eggs   FindN, while minimizing the number of drops for the worst case

6 6  There are one hundred closed lockers in a hallway   A man begins by opening all onehundred  lockers   Next, he  closes every  second locker  Then he goes to  every thirdlocker and closes it if it is open or opens it if it is closed (e g , he toggles every thirdlocker)  After his one hundredth pass in the hallway, in which he toggles only lockernumber one hundred, how many lockers are open?









1.   什么重要?数字背后往往都是有潜在含义的,15分钟,2两条绳子的选取都有其理由。

2.   简化!你可以轻松计时1小时(烧一条绳子就够了)

3.   现在你能计时半小时了吧?这就是一条绳子烧尽时间的一半。你能让这个时间加快一倍么?YES!(让这条绳子两端开花)

4.   你现在知道了:(1) 你可以计时30分钟 (2)你可以通过两端开花的方式让绳子烧尽的速度加快一倍

5.   继续往下想:如果你有条能烧30分钟的绳子,你便能计时15分钟了。但是,您能够截去绳子上那30分钟的时间么?

6.   截去绳子2上30分钟燃烧时间的方法:绳子1两端开花,绳子2一端烧。

7.   现在你的绳子2还剩30分钟的燃烧时间,准备煎蛋,并把绳子的另一端也点燃。那么,当绳子2烧完,你的鸡蛋也就煎熟了!

6.1   为下面的等式补上运算符号(加,减,乘,除)(必要时也可以加上括号)使等式成立 3 1 3 6 = 8

6.2   有一个8x8的象棋棋盘,一条对角线上的两个角被截去,你现在手上有31个多米诺牌,每个多米诺正好盖住两个格子,你能够用这31个多米诺牌盖住整个棋盘嘛?给出你的答案,并作证明(给出例子,或是证明为什么不可行)

6.3   你有一个能装5夸脱液体的罐子(five quart jug),无限量的水(但是没有称量的杯子)。试问,你如何能让罐子里的水恰好为4夸脱?


6.4   一帮男人在一个岛上,这是来了一个女巫,将众人召集到一起,并在某些人的头上各放上一顶帽子(即至少有有一个人头上是有帽子的)。这个帽子很神奇:它只能被除戴帽者之外的人看到。为了摘下这顶帽子,那些(也就是那些戴帽子的人)必须要将自己的头在午夜整点浸到水中。假设有n个人,c顶帽子,那么摘下这些帽子需要花上多长的时间?这些人不能相互告诉对方头上有帽子。


6.5   一座有100层楼的建筑,如果是在N层楼以上(包括N层楼)扔鸡蛋,这个鸡蛋一定会破,反之,如果是N层一下,鸡蛋则完好无损。你现在手头上有两个鸡蛋,问如何通过最少次数的试验找出N层楼所在。

6.6   走廊上有100扇关着的门,一个人先是打开所有这一百扇门,然后,再间或一扇(每两扇中关一扇)地关上其中的50扇门,然后,再间或两扇(每三扇门)地检查一遍,如果是关着的,便打开,如果是开着的,便关上(即改变门锁的状态)。这样反复做过100次后(也就是最后一次改变第100号门的状态),那么还有多少扇门是开着的?

2011-03-02 10:01 编辑:kuaileyingyu
  • 99027074 说:


    2011-03-02 21:52 回复 支持(2) 反对(1) 沙发
  • kevin_hgy 说:


    2011-03-03 09:10 回复 支持(2) 反对(1) 板凳
  • kevin_hgy 说:


    2011-03-03 09:13 回复 支持(1) 反对(1) 地板
  • 天使Jing 说:


    2011-03-03 17:14 回复 支持(2) 反对(1) 4 楼
  • liz_hsu 说:


    2011-03-10 14:57 回复 支持(2) 反对(1) 5 楼
  • juliatt 说:


    2011-03-10 15:53 回复 支持(2) 反对(1) 6 楼
  • 小捣蛋 说:


    2011-09-22 16:54 回复 支持(2) 反对(1) 7 楼