Completed Breadth First Search and Depth First Search