/BFS

Graph BFS in C

Primary LanguageC

BFS

Demands

  1. Draw G. Use a drawing tool such as MS Word, OpenOffice / LibreOffice Writer, MS Powerpoint, OpenOffice / LibreOffice Impress, MS Visio, Dia Diagram Editor (http: // dia-installer.de/), etc. You should not use a program that automatically creates the graph from its data. The aforementioned design tool is only allowed to help you to improve the aesthetics of the image (eg use ready-made circle and arrow).
  2. Properly convert the breadth first search (BFS) code, as you received it along with your personalized data, to cross the G starting from the top with id 0 and present the top visit steps, considering that the graph is undirected, by filling in the table below. The order of visit of the neighboring peaks must follow the ascending order of the order of these peaks. In the table, fill in each cell with the value L (white), C (Gray) or M (Black), when describing the APP method as described in the accompanying pdf of the pronunciation. Accompany the letter C with a number to indicate the order of visiting neighboring peaks during a step, where necessary (eg C1, C2, D - see also example in the Appendix).