提交 f2ed2d97 编写于 作者: W wizardforcel

2020-07-10 23:17:49

上级 60f8e24a
......@@ -18,7 +18,7 @@
![red-black tree](img/0aec6748125d4ca7b17ac926b60f7fdf.png "red-black tree")
Red Black Tree
红黑树
......
......@@ -156,7 +156,7 @@
![insertion in a red-black tree](img/734bc8ff285e56d0cd778370e7ae8348.png "final tree")
Final tree
最终的树
......
......@@ -183,7 +183,7 @@
![deletion-fix algorithm](img/314c7e92cf652bae80b9217f371831da.png "flowchart for deletion operation")
Flowchart for deletion operation
删除操作流程图
......
......@@ -25,7 +25,7 @@
![a graph contains vertices that are like points and edges that connect the points](img/abf9b1eff586dcbc635ccd0aedc5d1c0.png "Vertices and edges")
Vertices and edges
顶点和边
......@@ -61,7 +61,7 @@ G = {V, E}
![graph adjacency matrix for sample graph shows that the value of matrix element is 1 for the row and column that have an edge and 0 for row and column that don't have an edge](img/770a8f4913ca61c9bbb1de31b7f97dad.png "Graph adjacency matrix")
Graph adjacency matrix
图邻接矩阵
......@@ -79,7 +79,7 @@ Graph adjacency matrix
![adjacency list representation represents graph as array of linked lists where index represents the vertex and each element in linked list represents the edges connected to that vertex](img/a0cdb21344c49353e73743f80fe28594.png "Adjacency list representation")
Adjacency list representation
邻接表表示
......
......@@ -10,7 +10,7 @@
![Undirected Graph](img/7167ad2a18ac65a155f0105133975f95.png "Undirected Graph")
Undirected Graph
无向图
......@@ -18,7 +18,7 @@ Undirected Graph
![Connected Graph](img/0f73a6491cca9899d7b69678dba221a1.png "Connected Graph")
Connected Graph
连通图
......@@ -44,7 +44,7 @@ Connected Graph
![initial tree](img/772a4ca249aa31babda6d884ec8e82c9.png "normal graph")
Normal graph
普通的图
......@@ -52,37 +52,37 @@ Normal graph
![spanning tree](img/ab61bf190f5a55214c40cd566c195a3c.png "example of spanning tree")
A spanning tree
一棵生成树
![spanning tree](img/66a727c71c65f93b41b1dc99b1fe7120.png "example of spanning tree")
A spanning tree
一棵生成树
![spanning tree](img/3f28d17bef03ac0f8ddb999e15ca2422.png "example of spanning tree")
A spanning tree
一棵生成树
![spanning tree](img/4f01b3b97454c3118f952bf926fd84a8.png "example of spanning tree")
A spanning tree
一棵生成树
![spanning tree](img/ebfbe4e1257234834c2fdc032b55df5f.png "example of spanning tree")
A spanning tree
一棵生成树
![spanning tree](img/68e718922df50ff58a120da41bec693e.png "example of spanning tree")
A spanning tree
一棵生成树
......@@ -102,7 +102,7 @@ A spanning tree
![initial graph](img/02bf54af9a2d28b5ae2d333f44797be2.png "Initial weighted graph")
Weighted graph
带权图
......@@ -110,25 +110,25 @@ Weighted graph
![minimum spanning tree (mst)](img/5af1a28d8353695f7d64f8ca1df45d11.png "minimum spanning tree (mst)")
Minimum spanning tree - 1
最小生成树 - 1
![minimum spanning tree (mst)](img/5f43ada94dc41360b338aa5ea53ebbb9.png "minimum spanning tree (mst)")
Minimum spanning tree - 2
最小生成树- 2
![minimum spanning tree (mst)](img/c91fcbf6d0644c8f34a1365ab6b799da.png "minimum spanning tree (mst)")
Minimum spanning tree - 3
最小生成树 - 3
![minimum spanning tree (mst)](img/143ab3e6022bd6e93c97ddc18f850ae4.png "minimum spanning tree (mst)")
Minimum spanning tree - 4
最小生成树 - 4
......@@ -136,7 +136,7 @@ Minimum spanning tree - 4
![minimum spanning tree (mst)](img/370b67d295c38209808d4e2894d7226d.png "minimum spanning tree (mst)")
Minimum spanning tree
最小生成树
......
......@@ -12,7 +12,7 @@
![strongly connected components](img/0ab35ba4dd255e65c6311971600a6f6a.png "initial graph")
Initial graph
初始的图
......@@ -20,7 +20,7 @@ Initial graph
![Strongly connected components](img/7acb7991e5f198930acc668896e8d803.png "Strongly connected components")
Strongly connected components
强连通组件
......@@ -76,11 +76,8 @@ Kosaraju 算法基于[两次实现的深度优先搜索算法](/dsa/graph-dfs)
![reversed graph](img/72acad3fd395c8f2e21152a0337e1dc0.png "reversed graph")
DFS 在反转图
反转图上的 DFS
3. 对反向图执行深度优先搜索。
从栈的顶部顶点开始。 遍历其所有子顶点。 一旦到达已经访问过的顶点,就会形成一个强连通的组件。
......@@ -91,16 +88,12 @@ Kosaraju 算法基于[两次实现的深度优先搜索算法](/dsa/graph-dfs)
从顶部开始,并遍历所有顶点
转到栈并弹出顶部顶点(如果已访问)。 否则,请从栈中选择顶部顶点,然后遍历其子顶点,如上所示。
![strongly connected components](img/fddd7a4971a4cf06e40340961a1199f8.png "step-2")
如果已经访问过,则弹出顶部顶点
![reversed graph - strongly connected components](img/54ce7d5d6112c49854d34e8dd9ba4400.png "reversed graph - step-3")
强连通的组件
......
......@@ -20,7 +20,7 @@
![a graph and its equivalent adjacency matrix](img/770a8f4913ca61c9bbb1de31b7f97dad.png "Adjacency matrix from a graph")
Adjacency matrix from a graph
图的邻接矩阵
......
......@@ -16,7 +16,7 @@
![Adjacency List representation](img/a0cdb21344c49353e73743f80fe28594.png "Adjacency List representation")
Adjacency List representation
邻接表表示
......
......@@ -32,7 +32,7 @@ DFS 算法的工作原理如下:
![We start from vertex 0, the DFS algorithm starts by putting it in the Visited list and putting all its adjacent vertices in the stack.](img/adf56a84ca066b01a250844238d9df88.png "A DFS example")
Undirected graph with 5 vertices
具有 5 个顶点的无向图
......@@ -40,7 +40,7 @@ Undirected graph with 5 vertices
![Start by putting it in the Visited list and putting all its adjacent vertices in the stack.](img/a0345cdcfcaae55af3a679216b92939b.png "A DFS example")
Visit the element and put it in the visited list
访问元素并将其放在访问列表中
......@@ -48,7 +48,7 @@ Visit the element and put it in the visited list
![Next, we visit the element at the top of stack i.e. 1 and go to its adjacent nodes. Since 0 has already been visited, we visit 2 instead.](img/bd427d2a79ec03fd3bd4f19e3d443682.png "A DFS example")
Visit the element at the top of stack
访问栈顶部的元素
......@@ -56,14 +56,13 @@ Visit the element at the top of stack
![Vertex 2 has an unvisited adjacent vertex in 4, so we add that to the top of the stack and visit it.](img/986235e87d99767348c456875b51c3fd.png "A DFS example")
Vertex 2 has an unvisited adjacent vertex in 4, so we add that to the top of the stack and visit it.
顶点 2 在 4 中有一个未访问的相邻顶点,因此我们将其添加到栈的顶部并对其进行访问。
![Vertex 2 has an unvisited adjacent vertex in 4, so we add that to the top of the stack and visit it.](img/dc1e07e6e8a87a5f90f6cd2177e9ed0a.png "A DFS example")
Vertex 2 has an unvisited adjacent vertex in 4, so we add that to the top of the stack and visit it.
顶点 2 在 4 中有一个未访问的相邻顶点,因此我们将其添加到栈的顶部并对其进行访问。
在访问最后一个元素 3 之后,它没有任何未访问的相邻节点,因此我们完成了图的“深度优先遍历”。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册