[Algorithm – Java] The simulation algorithm searches the width (BFS) and depth (DFS)

The program described below 2 search algorithm width (BFS – Breadth-first search) and depth (DFS – Depth-first search) in graphics, There are walking and beautiful colors.

The interface of the program will boot like this:

duyệt đồ thị theo chiều sâu và chiều rộng

The program 4 The main part. Section on (top) the program title, bottom (bottom) mềnh name =)). Left panel (left) the panel. The right side is the graph.
You pay attention to the left side (dashboard). First you need to choose to browse graph algorithms, then enter the number of graphs (The maximum 10 point, if you want to modify the code to fix) and its edges. The point of the graph will be arranged in a circle to avoid overlapping paths offensive observed. After you finish typing the input is finally starting point run.

Below is a picture while browsing graph BFS and DFS.

duyệt đồ thị theo chiều rộng

duyệt đồ thị theo chiều sâu

Yellow is the color of the beginning, The last point is colored red. When approved, the approval order will be numbered. VD graph on, While browsing BFS will be 1->2->4->5->3

You can download source or file jar. Note that you need to install the new JDK run jar file.
Any questions or suggestions please contact your. Glad you are interested suggestions.