Solved the Farmer,Cabbage, Wolf and Goat problem using both breadth first, and depth-first search.
With breadth-first algorithm, queue(First In First Out) is used. In addition to this, it checks whether a vertex has been discovered before enqueueing the vertex rather than delaying this check until the vertex is dequeued from the queue
With depth-first algorithm, stack(First In Last Out) is used.