Introduction
As we all know, puzzles can significantly impact our development. Puzzles help us develop our problem-solving and critical-thinking abilities, both necessary for mastery of other skills later in life.
This article will discuss a famous interview puzzle named cross-bridge part-2. Cross bridge II is a very typical puzzle. If you want to solve this puzzle, you need to think out of the box. For an untrained eye, the answer would seem obvious, but most people cannot come up with an obvious answer on their first try. So let us give this puzzle a try.
Problem Statement
Ravi is a farmer, and one day he is returning from the market in the market. He bought a goat, a wolf, and a carrot. He needs to cross the river on the way to his home, but he has one boat in which he can utmost take one of the three things at a time.
But there is a bigger problem. The problem is that he can't keep the carrot and goat together because the goat would eat the carrot, nor can he keep the goat and the wolf together because the wolf would eat the goat.
He is asking you for help. He wants to know how many minimum trips he has to do so that everything is safe and is on the other side of the river.
Crossing the river counts as one trip ( If you go back to the same side of the river, the count would be 2).