Skip to content

Commit dfe084d

Browse files
authored
Update README.md
1 parent ae04edd commit dfe084d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,16 @@ c: 1. Dp State: Use f[i] or f[i][j] to represent the answer to a smaller problem
7373
f[i][j] = Derive by finding max / min / sum / or of some smaller state
7474

7575
4. Dp return: return the dp result. Like: such as f[n][m] or max(f[n][0], f[n][1] … f[n][m])
76+
77+
# Breadth-first search Algorithm
78+
Step 1: Choose any one node randomly, to start traversing.
79+
80+
Step 2: Visit its adjacent unvisited node.
81+
82+
Step 3: Mark it as visited in the boolean array and display it.
83+
84+
Step 4: Insert the visited node into the queue.
85+
86+
Step 5: If there is no adjacent node, remove the first node from the queue.
87+
88+
Step 6: Repeat the above steps until the queue is empty.

0 commit comments

Comments
 (0)