Implementation of Depth First Search for solving the farmer, goat and cabbage problem.