The trick to this puzzle is that you can keep the wolf and cabbage together. So the solution would be
The sailor will start with the goat. He will go to the other side of the river with the goat. He will keep goat there and will return back and will take cabbage with him on the next turn. When he reaches the other side he will keep the cabbage there and will take the goat back with him.
Now we will take the wolf and will keep the wolf at the other side of the river along with the cabbage. He will return back and will take goat along with him. This way they all will cross the river.
#RiverCrossingPuzzle #InterviewPuzzle #Puzzle #InfosysInterviewPuzzle