Removed unnecessary "visited" list in the breadth-first search algorithm. The precedessor map also holds visited information.