You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 91ca6b1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: solutions/1-1000/127-word-ladder.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ The **word transformation sequence** problem can be abstracted into a **graph th
45
45
### Breadth-First Search
46
46

47
47
48
-
* As shown in the figure above, **breadth-first search** can be thought of as visiting nodes in rounds and rounds. Actually, whenever you see a question is about
48
+
* As shown in the figure above, **breadth-first search** can be thought of as visiting vertices in rounds and rounds. Actually, whenever you see a question is about
49
49
getting `shortest` or `least` of something of a graph, `breadth-first search` would probably help.
50
50
51
51
*`breadth-first search` emphasizes first-in-first-out, so a **queue** is needed.
Copy file name to clipboardExpand all lines: solutions/1-1000/200-number-of-islands-2.md
+81-81Lines changed: 81 additions & 81 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ And this graph may have multiple **connected components** (islands):
45
45
46
46
Finding the number of islands is to find the number of `connected components`.
47
47
48
-
Walk from one node to the adjacent node until all nodes on the island are visited.
48
+
Walk from one vertex (land) to the adjacent vertices until all vertices on the island are visited.
49
49
50
50
## Steps
51
51
1. Find the first land.
@@ -68,12 +68,12 @@ The benefit of using iteration is better program performance. After all, recursi
68
68
69
69
Maintaining a stack by yourself can accomplish the same function as recursive calls.
70
70
71
-
From this sample code bellow, you can see that starting from a node, through recursive calls, it goes up until it can't go any further, turns right, and continues up. The priority order of directions is `up, right, down, left`.
71
+
From this sample code bellow, you can see that starting from a vertex, through recursive calls, it goes up until it can't go any further, turns right, and continues up. The priority order of directions is `up, right, down, left`.
0 commit comments