Puzzles for Interview at Software Companies

3
1. Two fifty-foot ropes are suspended from a forty-foot ceiling twenty feet apart. You have only a knife. How much of the rope can you steal? 2. How long is the answer to this question? (think aterally/creatively) 3. For a perfect breakfast, a person decides to boil an egg exactly 15 minutes. She has two hourglasses - one for 7 minutes, another for 11. How should she go about preparing her breakfast? How many times will she have to turn the hourglasses? 1. How can she do this with the minimal required number of hourglass turns? 2. What is the quickest time and procedure for her to prepare breakfast? 4. We have 12 coins and a balance. Eleven Coins are of the same weight, but one coin differs in weight. You may perform three weighing to find out which coin has a different weight. How should you do these three experiments to find it out? 5. Given 21 coins, one of which weighs slightly more than the others, and a two-plate scale, how many weighing are necessary to determine the heavier coin? What if there are 200 coins, among which there is again one coin slightly heavier than the others are. How many weighing are necessary now? Finally, given n coins and a two-plate scale, how many weighing are necessary to find the heavier coin? 6. A woman steps to the edge of a very high building, & as people look on, she leaps off, & falls several stories. The woman is not injured. Why? Hint: The woman did not fall on cushions or any other type of softened surface, & was not wearing a parachute. 7. Find the no. of people in the picture! 9PEOPLE.jpg (72 KB ) 8. You have two uneven pieces of rope, each of which takes exactly one hour to burn. Since the ropes are uneven, half the rope need not burn in half an hour. All you know is that the entire rope will burn in one hour. You need to measure exactly 45 minutes. How? 9. Language: Find an English word which is singular, add an 's' and it becomes plural, and add another 's' it becomes singular again? 10. Lateral Thinking: An ordinary American citizen, with no passport, visits over thirty foreign countries in one day. He is welcomed in each country and leaves each one of his own accord. 11. Logic: As Dante was reaching River Styx on his way back from the Underworld, he was expecting to hitch a ride back on Charon's boat, and then go to pay a visit in Purgatory. As things went, Charon turned out to be a rather nasty fellow. Instead of giving Dante a nice, hassle- free trip back across the damned river, he called his three best

Transcript of Puzzles for Interview at Software Companies

Page 1: Puzzles for Interview at Software Companies

7/29/2019 Puzzles for Interview at Software Companies

http://slidepdf.com/reader/full/puzzles-for-interview-at-software-companies 1/3

1. Two fifty-foot ropes are suspended from a forty-foot ceiling twenty

feet apart. You have only a knife. How much of the rope can you steal?

2. How long is the answer to this question? (think aterally/creatively)

3. For a perfect breakfast, a person decides to boil an egg exactly 15

minutes. She has two hourglasses - one for 7 minutes, another for 11.How should she go about preparing her breakfast? How many times will

she have to turn the hourglasses? 1. How can she do this with the

minimal required number of hourglass turns? 2. What is the quickest

time and procedure for her to prepare breakfast?

4. We have 12 coins and a balance. Eleven Coins are of the same

weight, but one coin differs in weight. You may perform three weighing

to find out which coin has a different weight. How should you do these

three experiments to find it out?

5. Given 21 coins, one of which weighs slightly more than the others,

and a two-plate scale, how many weighing are necessary to determine the

heavier coin? What if there are 200 coins, among which there is again

one coin slightly heavier than the others are. How many weighing arenecessary now? Finally, given n coins and a two-plate scale, how many

weighing are necessary to find the heavier coin?

6. A woman steps to the edge of a very high building, &

as people look on, she leaps off, & falls several stories. The woman

is not injured. Why?

Hint: The woman did not fall on cushions or any other type of softened

surface, & was not wearing a parachute.

7. Find the no. of people in the picture!

9PEOPLE.jpg (72KB)

8. You have two uneven pieces of rope, each of which takes exactly one

hour to burn. Since the ropes are uneven, half the rope need not burn

in half an hour. All you know is that the entire rope will burn in one

hour. You need to measure exactly 45 minutes. How?

9. Language: Find an English word which is singular, add an 's'

and it becomes plural, and add another 's' it becomes singular again?

10. Lateral Thinking: An ordinary American citizen, with no

passport, visits over thirty foreign countries in one day. He iswelcomed in each country and leaves each one of his own accord.

11. Logic: As Dante was reaching River Styx on his way back from

the

Underworld, he was expecting to hitch a ride back on Charon's boat, and

then go to pay a visit in Purgatory. As things went, Charon turned out

to be a rather nasty fellow. Instead of giving Dante a nice, hassle-

free trip back across the damned river, he called his three best

Page 2: Puzzles for Interview at Software Companies

7/29/2019 Puzzles for Interview at Software Companies

http://slidepdf.com/reader/full/puzzles-for-interview-at-software-companies 2/3

buddies. Dante looked at them. The monsters were pretty ugly overall.

"You see, Dante, nothing is free in life - or death - except

suffering," said Charon. "My three friends here are rather peculiar:

one of them always tells the truth, another one always lies, and the

last one is a bit of a lunatic: sometimes it tells the truth and

sometimes it lies. You have a total of three questions you can ask

them to find out which one is which. I'll take you on the other side

of the Styx if and only if you can tell me, without a shadow of a

doubt, which one tells the truth, which one is the liar, and which one

is the lunatic. Oh, I almost forgot to tell you - silly me - they can

only answer yes or no. Isn't life great?" What three questions will

enable Dante to cross the River Styx?

12. Math: A clock is observed. The hour hand is exactly at the minute

mark, and the minute hand is six minutes ahead of it. Later, the clock

is observed again. This time, the hour hand is exactly on a different

minute mark, and the minute hand is seven minutes ahead of it. How

much time elapsed between the first and second observations?

13. Paradox: NEWCOMB'S PARADOX - A philosophy professor at your

school has a reputation for being brilliant as well as possessed of anenormous fortune he has dedicated to his research. One day you get a

request to report to his office at a certain hour. On a table are two

boxes. One of them, labeled A, is transparent; in it, you can see an

enormous pile of $100 bills. The other, labeled B, is opaque. He

tells you that there is $10,000 in transparent box A and that in box B

there is either $1,000,000 or nothing. The philosophy professor then

tells you that he is going to give you a choice between - (1) Taking

just what is in box B. (2) Taking what is in both boxes. (Think about

what you would choose given this much information.) Then, he tells you

that this is part of an experiment. During registration at the

beginning of the quarter, you walked under a peculiar device that

reminded you of the machines at airports that are used to prevent

hijacking. You did not think much about it at the time. However, he

now informs you that this machine was something he designed and that it

recorded an instant profile of your basic personality and character

traits. On the basis of your profile, he made a prediction about what

choice you would make, and he decided what to put in box B on the basis

of this prediction: (1) If he predicted you would take both, he put

nothing in box B. (2) If he predicted you would take only box B, he

would put $1,000,000 in it. (Now, think about what you would do given

this much

information.) At this point, you ask the professor how accurate his

predictions have been. He tells you, correctly, that 1,000 students

have been given the choice, and he has only been wrong once. In all

other cases, students who chose both boxes got only $10,000, whereas

those who chose only box B got $1,000,000. Then he tells you to

choose. What would *you* do?

14. Practical Reasoning: Four switches can be turned on or off.

One

is the light switch for the incandescent overhead light in the next

room, but you do not know which. The other three switches do nothing.

From the room with the switches in it, you cannot see whether the light

in the next room is turned on or off. You may flip the switches as

often and as many times as you like, but once you enter the next room

to check on the light, you must be able to say which switch controls

Page 3: Puzzles for Interview at Software Companies

7/29/2019 Puzzles for Interview at Software Companies

http://slidepdf.com/reader/full/puzzles-for-interview-at-software-companies 3/3

the light without flipping the switches any further. (And you cannot

open the door without entering,

either!) How can you determine which switch controls the light?

15. Riddle:

Pronounced as one letter,

And written with three,

Two letters there are,

And two only in me.

I'm double, I'm single,

I'm black, blue, and gray,

I'm read from both ends,

And the same either way.

What am I?