# The Puzzle Tread. Interview questions asked at Tech companies in India.

• An intelligent trader with 3 sacks of 30 coconuts each. Riddle.?

An intelligent trader travels from one place to another with 3 sacks having 30 coconuts each. No sack can hold more than 30 coconuts. On the way, he passes 30 check points. At each check point, he has to give one coconut for every sack he is carrying.
How many coconuts are left with him in the end ?

• Can he dispose of a sack once it's empty?

• Laissez-faire capitalist solution: Lend the sacks of coconuts to someone else to carry through the checkpoints (while the trader himself goes through sack-less) then charge the sucker back when they don't have all the coconuts at the end (less some small fee, say 1 coconut). After all, he should have worked out what was going on before agreeing to carry coconuts through those checkpoints.

• Zero, the checkpoint officials are corrupt, and all of the coconuts are taken at the first checkpoint.

• I'm getting 25 here using napkin maths. Ok, I Iied, I have no napkins so I used an imaginary one. Seems like a pretty simple question. Is there supposed to be a catch here?

Filed under: Other answers are better because mine is boring

• 9/10 would flame

• Can he dispose of a sack once it's empty?

of course. he must.

• I think you are correct with 25. also least creative answer.
@Onyx said:

I'm getting 25 here using napkin maths. Ok, I Iied, I have no napkins so I used an imaginary one. Seems like a pretty simple question. Is there supposed to be a catch here?

Filed under: Other answers are better because mine is boring

• Zero, the checkpoint officials are corrupt, and all of the coconuts are taken at the first checkpoint.

Not very creative. The official are smart enough to Not kill the goose that is laying golden eggs. He would be out of business if they do that.

• Laissez-faire capitalist solution: Lend the sacks of coconuts to someone else to carry through the checkpoints (while the trader himself goes through sack-less) then charge the sucker back when they don't have all the coconuts at the end (less some small fee, say 1 coconut). After all, he should have worked out what was going on before agreeing to carry coconuts through those checkpoints.

That is how opium trade work in many part of the world.

• I think you are correct with 25. also least creative answer.

I had to get the mathematically correct one out of the way before @ben_lubar got here. Now the rest of you can have fun with it.

No respect for self-sacrifice in today's world. Sigh.

• I had to get the mathematically correct one out of the way before @ben_lubar got here. Now the rest of you can have fun with it.

No respect for self-sacrifice in today's world. Sigh.

I am happy that you are most likely person to pass the test.

• Does it matter how the coconuts are distributed from the bags? Should we optimize to have more or less coconuts at the end? What if a swallow drops another coconut in your bag?

• What if a swallow drops another coconut in your bag?

And does it matter if it's African or European?

Filed under: Monty Python references, just for you@blakeyrat

• And does it matter if it's African or European?

Damn, beat me to it.
@Onyx said:

Monty Python references, just for you @blakeyrat

We know @blakeyrat's reading; I wonder what it will take to push him into posting.

• The answer is of course 42.

• We know @blakeyrat's reading; I wonder what it will take to push him into posting.

Someone posted his tweet complaining about Monty Python quotes. I say we try that. Our chief weapon should be Monty Python, And Linux. Two, our two...

• Amongst our weaponry are such diverse elements as Monty Python, Linux, Hitchhiker's Guide to the Galaxy quotes and Mornington Crescent.

• Has anyone mentioned to @blakeyrat that @codinghorror included vim controls for discourse?

• Has anyone mentioned to @blakeyrat that @codinghorror included vim controls for discourse?

I think he mentioned somewhere he was actually using j and k

I'd / that for you, but I'm too lazy.

• Should we optimize to have more or less coconuts at the end?

This is the real question here. Personally, I think that coconuts are a bitch to carry around, so I'd go for less ASAP.

Does the riddle allow coconuts to be discarded at will?

• for every sack

Is the trader male or female?

• I'm not seeing---

Â
ohhh

wait

• I'm not seeing---

ohhh

wait

Let's just hope that the word "coconut" is well defined at the check points.

• @Keith said:
Can he dispose of a sack once it's empty?

of course. he must.

What do you mean, he must? Never heard of recycling? Those sacks are perfectly reusable once rinsed and cleaned after usage!

The government should introcude a coconut-sack deposit, so that the empty sacks are not dumped on the side of the road, littering the countryside.

• Perhaps the bags are made out of coconut remains and are biodegradable.

• Perhaps the bags are made out of coconut remains and are biodegradable.

That looks more like protective armour than a handbag. For some reason or other the "Hell's grannies" sketch from Monty Python comes to mind, although that might have been caused by @blakeyrat mentions in another thread.

• I'm puzzled. One thing that the OP has never explained â€” why is someone making tires/tyres out of jigsaw puzzle pieces?

• @HardwareGeek what is puzzling you? I am not writing about tyres or tires, but some of the people who try this puzzle get tired

• I am not writing about tyres or tires