...

/

Farmer Crosses River Puzzle

Farmer Crosses River Puzzle

Enhance your analytical skills by solving the “farmer crosses the river” puzzle.

Problem

A farmer wants to cross a river and take with him a wolf, a sheep, and a cabbage. There is a boat that can fit him plus either the wolf, the sheep, or the cabbage. If the wolf and the sheep are alone on one shore, the wolf will eat the sheep. If the sheep and the cabbage are alone on the shore, the sheep will eat the cabbage.

Expected output

Access this course and 1400+ top-rated courses and projects.