Technical Interview

Home
Added Recently
Data Structures
Puzzles
Google & Microsoft
C/C++ Questions
Java Interview Questions
Quantitative Problems
Algorithms
Featured Articles
Amazon Interview Question
Compaq Interview Question
Technical Interview
Interview Process
Introduction Questions
Object Oriented
Google Pages
Fundamental Questions
Resume Tips
Links
Contact Us
Submit Question/Answer

Puzzle:

A man has to get a fox, a chicken, and a sack of corn across a river.

He has a rowboat, and it can only carry him and one other thing.

If the fox and the chicken are left together, the fox will eat the chicken.

If the chicken and the corn are left together, the chicken will eat the corn.

How does the man do it?


Solution:

The man and the chicken cross the river, (the fox and corn are safe together), he leaves the chicken on the other side and goes back across.

The man then takes the fox across the river, and since he can't leave the fox and chicken together, he brings the chicken back.

Again, since the chicken and corn can't be left together, he leaves the chicken and he takes the corn across and leaves it with the fox.

He then returns to pick up the chicken and heads across the river one last time.