Skip to content

Commit 5fe4ff9

Browse files
committed
update readme
1 parent 5792823 commit 5fe4ff9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
||Merge sort|[merge_sort_topdown.py](./algorithm/python/merge_sort_topdown.py), [mergesort_bottomup.py](./algorithm/python/merge_sort_bottomup.py), [MergeSortTopDown.java](./leetcode_java/src/main/java/AlgorithmJava/MergeSortTopDown.java), [SQL](./algorithm/sql/Mergesort.sql) | | | `Best : O(N Log N), Avg : O(N Log N), Worst : O(N Log N)` | O(N)| OK* (2)|
187187
||Pancake sort| [Python](./algorithm/python/pancake_sort.py) | | | | | AGAIN|
188188
||Selection sort| [Python](./algorithm/python/selection_sort.py), [JS](./algorithm/js/selection_sort.js) | | | | | AGAIN|
189-
||Topological sort| [Python](./algorithm/python/topological_sort.py), [Java](./leetcode_java/src/main/java/AlgorithmJava/TopologicalSort.java) | | Topological Sort is a algorithm can find "ordering" on an "order dependency" graph | | | AGAIN|
189+
||Topological sort| [Python](./algorithm/python/topological_sort.py), [Java](./leetcode_java/src/main/java/AlgorithmJava/TopologicalSort.java), [Java V2](./leetcode_java/src/main/java/AlgorithmJava/TopologicalSortV2.java) | | Topological Sort is a algorithm can find "ordering" on an "order dependency" graph | | | AGAIN|
190190
||md5 | [Python](./algorithm/python/md5.py) | | | | | AGAIN|
191191
||Union Find | [Python 1](./algorithm/python/union_find.py), [Python 2](./algorithm/python/union_find_if_cyclic.py), [Java 1](./leetcode_java/src/main/java/AlgorithmJava/UnionFind.java) | | | AGAIN|
192192
||Dynamic programming|[JS 1](./algorithm/js/dp_demo_1.js), [fibonacci_dp JS](./algorithm/js/fibonacci_dp.js) | | | | | AGAIN|

leetcode_java/src/main/java/AlgorithmJava/TopologicalSort.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ public static void main(String[] args) {
172172
TopologicalSort topoSort = new TopologicalSort();
173173
int numCourses = 4;
174174
// Directed Acyclic Graph (DAG) where each directed edge u -> v means that u comes before v.
175-
int[][] prerequisites = {{1, 0}, {2, 0}, {3, 1}, {3, 2}};
175+
//int[][] prerequisites = {{1, 0}, {2, 0}, {3, 1}, {3, 2}};
176+
int[][] prerequisites = {{1, 0}, {3, 1}, {2, 0}, {3, 2}};
176177

177178
int[] result = topoSort.topologicalSort(numCourses, prerequisites);
178179
System.out.println("Topological Order: " + Arrays.toString(result));

0 commit comments

Comments
 (0)