Application Of Depth First Search