Implemented Depth First Search Algorithm