提交 993c0521 编写于 作者: W wizardforcel

2020-07-10 23:27:31

上级 98dfd760
......@@ -12,7 +12,7 @@
![Bucket Sort Working](img/5205190afeb1f464bd5a69ea2e7c63c1.png "Working of bucket sort")
Working of Bucket Sort
桶排序工作
......
......@@ -82,7 +82,7 @@ Parent of 12 (position 1)
![max heap min heap comparison](img/79e61bda9ace4c785f5b129a6b78d971.png "max heap min heap comparison")
Max Heap and Min Heap
最大堆和最小堆
......@@ -106,7 +106,7 @@ heapify(array)
![graph shows how base case of heapify works](img/a8ccda62569a7c3b3b0439f6931e54a2.png "Heapify base case")
Heapify base cases
建堆的基础案例
......@@ -118,7 +118,7 @@ Heapify base cases
![image showing tree data with root element containing two max-heap subtrees](img/e952b2e63ec5550fc7d1fe1c61b15f18.png "How to heapify root element when its subtrees are already max heaps")
How to heapify root element when its subtrees are already max heaps
当其子树已经是最大堆时,如何对根元素建堆
......@@ -128,7 +128,7 @@ How to heapify root element when its subtrees are already max heaps
![steps to heapify root element when both of its subtrees are already max-heaps](img/34277044753dfc37c7504d8a3a18bb57.png "how to heapify root element when its subtrees are max-heaps")
How to heapify root element when its subtrees are max-heaps
当子树为最大堆时如何对根元素建堆
......@@ -177,25 +177,25 @@ void heapify(int arr[], int n, int i) {
![steps to build max heap for heap sort](img/ab936410d1f44c018c8467126a5ff0b0.png "Steps to build max heap for heap sort")
Create array and calculate i
创建数组并计算`i`
![steps to build max heap for heap sort](img/e06269309304786c8832c995ed0dfe3f.png "Steps to build max heap for heap sort")
Steps to build max heap for heap sort
建立用于堆排序的最大堆的步骤
![steps to build max heap for heap sort](img/073cf6d2233a07de82308ed3512c0816.png "Steps to build max heap for heap sort")
Steps to build max heap for heap sort
建立用于堆排序的最大堆的步骤
![steps to build max heap for heap sort](img/34c80fc7342d3335e84cbb7bf3df5393.png "Steps to build max heap for heap sort")
Steps to build max heap for heap sort
建立用于堆排序的最大堆的步骤
......@@ -215,7 +215,7 @@ Steps to build max heap for heap sort
![procedures for implementing heap sort](img/1e7348280393ecb6c2ee05cc288fb211.png "We need to repeatedly exchange root element with last element and heapify the root element to implement heap sort ")
Swap, Remove, and Heapify
交换,删除和建堆
......
......@@ -14,7 +14,7 @@
![Initial array](img/99440e6ff5db6cfe7b0eb8f8d6a1a3ff.png "Linear Search Array")
Array to be searched for
要搜索的数组
......
......@@ -12,7 +12,7 @@ Ford-Fulkerson 算法是一种[贪婪方法](http://programiz.com/dsa/greedy-alg
![Flow network](img/b7b65c03bb4f187c1b02614fa402f13d.png "Flow network")
Flow network graph
图的网络流
......@@ -54,7 +54,7 @@ Flow network graph
![Flow network](img/bea103bff1f6fc3b90859147ff3489ab.png "Flow network")
Flow network graph example
图的网络流示例
......
......@@ -14,7 +14,7 @@ Dijkstra 算法的工作原理是,顶点`A`和`D`之间的最短路径`A -> D`
![shortest subpath property is used by dijkstra's algorithm](img/9498777e7e23c844e777073185804323.png "Subpaths - Dijkstra's Algorithm")
Each subpath is the shortest path
每个子路径是最短路径
......@@ -30,19 +30,19 @@ Djikstra 在相反的方向上使用了此属性,即我们高估了每个顶
![Start with a weighted graph](img/48879960b181eee06d97d17d30dd90a0.png "Dijkstra's algorithm steps")
Start with a weighted graph
从加权图开始
![Choose a starting vertex and assign infinity path values to all other devices](img/748feed816b144c6849677220de0a3d1.png "Dijkstra's algorithm steps")
Choose a starting vertex and assign infinity path values to all other devices
选择一个起始顶点并将无限路径值分配给所有其他设备
![Go to each vertex and update its path length](img/c79fedd0835603a54fc60d6db9fc1c1a.png "Dijkstra's algorithm steps")
Go to each vertex and update its path length
转到每个顶点并更新其路径长度
......@@ -59,19 +59,18 @@ Go to each vertex and update its path length
![After each iteration, we pick the unvisited vertex with the least path length. So we choose 5 before 7](img/967ff9a46bd747817b6797573e2c2082.png "Dijkstra's algorithm steps")
After each iteration, we pick the unvisited vertex with the least path length. So we choose 5 before 7
每次迭代后,我们选择路径长度最小的未访问顶点。 所以我们选择 7 之前的 5
![Notice how the rightmost vertex has its path length updated twice](img/6bc46ea761b3ee379e7c8b6cbf54249e.png "Dijkstra's algorithm steps")
Notice how the rightmost vertex has its path length updated twice
注意最右边的顶点的路径长度如何更新两次
![Repeat until all the vertices have been visited](img/eaf532e8e5354f3f999ee96da53a010b.png "Dijkstra's algorithm steps")
Repeat until all the vertices have been visited
重复直到所有顶点都被访问
......
......@@ -29,7 +29,7 @@ Kruskal 算法是一种[最小生成树](/dsa/spanning-tree-and-minimum-spanning
![Start with a weighted graph](img/8b9aad73a8be2173c9a522f317c0ff86.png "Kruskal's algorithm example ")
Start with a weighted graph
从加权图开始
......@@ -41,25 +41,25 @@ Start with a weighted graph
![Choose the next shortest edge and add it](img/d566d17aae5a5cabe53018839f735833.png "Kruskal's algorithm example ")
Choose the next shortest edge and add it
选择下一个最短边并添加
![Choose the next shortest edge that doesn't create a cycle and add it](img/8ae9dc9097c79fe178b9b051e479a20b.png "Kruskal's algorithm example ")
Choose the next shortest edge that doesn't create a cycle and add it
选择下一个最短边并添加
![Choose the next shortest edge that doesn't create a cycle and add it](img/db49c769228ebfb1e728a5c4d10cf1be.png "Kruskal's algorithm example ")
Choose the next shortest edge that doesn't create a cycle and add it
选择下一个最短边并添加
![Repeat until you have a spanning tree](img/579a18bf6f9bd5cd6802e7a10b0aa3ad.png "Kruskal's algorithm example ")
Repeat until you have a spanning tree
重复直到您有一棵生成树
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册