├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── CheatSheet.md ├── LICENSE ├── Makefile ├── README.md ├── benches ├── common.rs ├── dp.rs ├── math.rs ├── sort.rs └── strings.rs ├── cpp ├── fib.c └── fib.h ├── examples └── quadratic.rs ├── plotters-doc-data └── 0.png ├── res ├── algs4_cover.png ├── common │ ├── mediumUF.txt │ ├── tinyUF.txt │ └── tobe.txt ├── graph │ ├── jobs.txt │ ├── jobsPC.txt │ ├── mediumG.txt │ ├── rates.txt │ ├── routes.txt │ ├── tinyCG.txt │ ├── tinyDAG.txt │ ├── tinyDG.txt │ ├── tinyEWD.txt │ ├── tinyEWDAG.txt │ ├── tinyEWDn.txt │ ├── tinyEWDnc.txt │ ├── tinyEWG.txt │ └── tinyG.txt ├── kmp_dfa.png ├── strings │ ├── abra.txt │ ├── pi.txt │ ├── shells.txt │ ├── shellsST.txt │ └── words3.txt └── trending-day-2021-08-21.png ├── src ├── common │ ├── binary_tree.rs │ ├── drop.rs │ ├── max_heap.rs │ ├── mod.rs │ ├── priority_queue.rs │ ├── queue.rs │ ├── stack.rs │ ├── top_m.rs │ ├── uf.rs │ └── util.rs ├── dp │ ├── coin.rs │ ├── fib.rs │ └── mod.rs ├── graph │ ├── directed │ │ ├── cycle.rs │ │ ├── digraph.rs │ │ ├── mod.rs │ │ ├── order.rs │ │ ├── scc.rs │ │ ├── search.rs │ │ ├── sort.rs │ │ └── transitive_closure.rs │ ├── mod.rs │ ├── mst │ │ ├── edge.rs │ │ ├── ew_graph.rs │ │ ├── kruskal_mst.rs │ │ ├── lazy_prim_mst.rs │ │ ├── mod.rs │ │ └── prim_mst.rs │ ├── shortest │ │ ├── acyclic_sp.rs │ │ ├── arbitrage.rs │ │ ├── bellman_ford_sp.rs │ │ ├── cpm.rs │ │ ├── dijkstra_sp.rs │ │ ├── directed_edge.rs │ │ ├── ew_digraph.rs │ │ └── mod.rs │ ├── undirected │ │ ├── bipartite.rs │ │ ├── cc.rs │ │ ├── cycle.rs │ │ ├── dfs.rs │ │ ├── dfs2.rs │ │ ├── graph.rs │ │ └── mod.rs │ └── util │ │ ├── mod.rs │ │ ├── parser.rs │ │ ├── paths.rs │ │ └── symbol_graph.rs ├── lib.rs ├── ll │ ├── cycle.rs │ ├── kth2tail.rs │ ├── linked_list.rs │ ├── mod.rs │ └── reverse.rs ├── math │ ├── mod.rs │ ├── mysqrt.rs │ └── sparse_vector.rs ├── other │ ├── min_free.rs │ └── mod.rs ├── search │ ├── binary.rs │ └── mod.rs ├── sort │ ├── bubble.rs │ ├── floyd.rs │ ├── insert.rs │ ├── merge.rs │ ├── mod.rs │ ├── quick.rs │ ├── selection.rs │ ├── shell.rs │ └── tree_selection.rs ├── strings │ ├── alphabet.rs │ ├── brute_force.rs │ ├── count.rs │ ├── kmp.rs │ ├── lsd.rs │ ├── mod.rs │ ├── msd.rs │ ├── palindrome.rs │ ├── quick3.rs │ ├── tries.rs │ └── tst.rs └── tree │ ├── binary │ ├── avl.rs │ ├── bst.rs │ ├── builder │ │ ├── level.rs │ │ ├── mod.rs │ │ └── tournament.rs │ ├── mod.rs │ ├── node.rs │ ├── rb.rs │ ├── rb2.rs │ ├── traverse.rs │ └── tree.rs │ └── mod.rs ├── tests ├── playground.rs ├── test_alphabet.rs ├── test_bst_tree.rs ├── test_common.rs ├── test_common_heap.rs ├── test_directed_graph.rs ├── test_dp.rs ├── test_graph_mst.rs ├── test_linked_list.rs ├── test_math.rs ├── test_rb_tree.rs ├── test_rb_tree2.rs ├── test_search.rs ├── test_shortest_paths.rs ├── test_sort.rs ├── test_sparse_vec.rs ├── test_strings.rs ├── test_tree_traverse.rs └── test_undirected_graph.rs └── todos.md /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | res/graph/movies.txt -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/Cargo.lock -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/Cargo.toml -------------------------------------------------------------------------------- /CheatSheet.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/CheatSheet.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/README.md -------------------------------------------------------------------------------- /benches/common.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/benches/common.rs -------------------------------------------------------------------------------- /benches/dp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/benches/dp.rs -------------------------------------------------------------------------------- /benches/math.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/benches/math.rs -------------------------------------------------------------------------------- /benches/sort.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/benches/sort.rs -------------------------------------------------------------------------------- /benches/strings.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/benches/strings.rs -------------------------------------------------------------------------------- /cpp/fib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/cpp/fib.c -------------------------------------------------------------------------------- /cpp/fib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/cpp/fib.h -------------------------------------------------------------------------------- /examples/quadratic.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/examples/quadratic.rs -------------------------------------------------------------------------------- /plotters-doc-data/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/plotters-doc-data/0.png -------------------------------------------------------------------------------- /res/algs4_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/algs4_cover.png -------------------------------------------------------------------------------- /res/common/mediumUF.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/common/mediumUF.txt -------------------------------------------------------------------------------- /res/common/tinyUF.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/common/tinyUF.txt -------------------------------------------------------------------------------- /res/common/tobe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/common/tobe.txt -------------------------------------------------------------------------------- /res/graph/jobs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/jobs.txt -------------------------------------------------------------------------------- /res/graph/jobsPC.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/jobsPC.txt -------------------------------------------------------------------------------- /res/graph/mediumG.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/mediumG.txt -------------------------------------------------------------------------------- /res/graph/rates.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/rates.txt -------------------------------------------------------------------------------- /res/graph/routes.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/routes.txt -------------------------------------------------------------------------------- /res/graph/tinyCG.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/tinyCG.txt -------------------------------------------------------------------------------- /res/graph/tinyDAG.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/tinyDAG.txt -------------------------------------------------------------------------------- /res/graph/tinyDG.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/tinyDG.txt -------------------------------------------------------------------------------- /res/graph/tinyEWD.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/tinyEWD.txt -------------------------------------------------------------------------------- /res/graph/tinyEWDAG.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/tinyEWDAG.txt -------------------------------------------------------------------------------- /res/graph/tinyEWDn.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/tinyEWDn.txt -------------------------------------------------------------------------------- /res/graph/tinyEWDnc.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/tinyEWDnc.txt -------------------------------------------------------------------------------- /res/graph/tinyEWG.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/tinyEWG.txt -------------------------------------------------------------------------------- /res/graph/tinyG.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/graph/tinyG.txt -------------------------------------------------------------------------------- /res/kmp_dfa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/kmp_dfa.png -------------------------------------------------------------------------------- /res/strings/abra.txt: -------------------------------------------------------------------------------- 1 | ABRACADABRA! -------------------------------------------------------------------------------- /res/strings/pi.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/strings/pi.txt -------------------------------------------------------------------------------- /res/strings/shells.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/strings/shells.txt -------------------------------------------------------------------------------- /res/strings/shellsST.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/strings/shellsST.txt -------------------------------------------------------------------------------- /res/strings/words3.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/strings/words3.txt -------------------------------------------------------------------------------- /res/trending-day-2021-08-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/res/trending-day-2021-08-21.png -------------------------------------------------------------------------------- /src/common/binary_tree.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/binary_tree.rs -------------------------------------------------------------------------------- /src/common/drop.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/drop.rs -------------------------------------------------------------------------------- /src/common/max_heap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/max_heap.rs -------------------------------------------------------------------------------- /src/common/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/mod.rs -------------------------------------------------------------------------------- /src/common/priority_queue.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/priority_queue.rs -------------------------------------------------------------------------------- /src/common/queue.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/queue.rs -------------------------------------------------------------------------------- /src/common/stack.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/stack.rs -------------------------------------------------------------------------------- /src/common/top_m.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/top_m.rs -------------------------------------------------------------------------------- /src/common/uf.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/uf.rs -------------------------------------------------------------------------------- /src/common/util.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/common/util.rs -------------------------------------------------------------------------------- /src/dp/coin.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/dp/coin.rs -------------------------------------------------------------------------------- /src/dp/fib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/dp/fib.rs -------------------------------------------------------------------------------- /src/dp/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/dp/mod.rs -------------------------------------------------------------------------------- /src/graph/directed/cycle.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/directed/cycle.rs -------------------------------------------------------------------------------- /src/graph/directed/digraph.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/directed/digraph.rs -------------------------------------------------------------------------------- /src/graph/directed/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/directed/mod.rs -------------------------------------------------------------------------------- /src/graph/directed/order.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/directed/order.rs -------------------------------------------------------------------------------- /src/graph/directed/scc.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/directed/scc.rs -------------------------------------------------------------------------------- /src/graph/directed/search.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/directed/search.rs -------------------------------------------------------------------------------- /src/graph/directed/sort.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/directed/sort.rs -------------------------------------------------------------------------------- /src/graph/directed/transitive_closure.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/directed/transitive_closure.rs -------------------------------------------------------------------------------- /src/graph/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/mod.rs -------------------------------------------------------------------------------- /src/graph/mst/edge.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/mst/edge.rs -------------------------------------------------------------------------------- /src/graph/mst/ew_graph.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/mst/ew_graph.rs -------------------------------------------------------------------------------- /src/graph/mst/kruskal_mst.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/mst/kruskal_mst.rs -------------------------------------------------------------------------------- /src/graph/mst/lazy_prim_mst.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/mst/lazy_prim_mst.rs -------------------------------------------------------------------------------- /src/graph/mst/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/mst/mod.rs -------------------------------------------------------------------------------- /src/graph/mst/prim_mst.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/mst/prim_mst.rs -------------------------------------------------------------------------------- /src/graph/shortest/acyclic_sp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/shortest/acyclic_sp.rs -------------------------------------------------------------------------------- /src/graph/shortest/arbitrage.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/shortest/arbitrage.rs -------------------------------------------------------------------------------- /src/graph/shortest/bellman_ford_sp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/shortest/bellman_ford_sp.rs -------------------------------------------------------------------------------- /src/graph/shortest/cpm.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/shortest/cpm.rs -------------------------------------------------------------------------------- /src/graph/shortest/dijkstra_sp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/shortest/dijkstra_sp.rs -------------------------------------------------------------------------------- /src/graph/shortest/directed_edge.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/shortest/directed_edge.rs -------------------------------------------------------------------------------- /src/graph/shortest/ew_digraph.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/shortest/ew_digraph.rs -------------------------------------------------------------------------------- /src/graph/shortest/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/shortest/mod.rs -------------------------------------------------------------------------------- /src/graph/undirected/bipartite.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/undirected/bipartite.rs -------------------------------------------------------------------------------- /src/graph/undirected/cc.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/undirected/cc.rs -------------------------------------------------------------------------------- /src/graph/undirected/cycle.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/undirected/cycle.rs -------------------------------------------------------------------------------- /src/graph/undirected/dfs.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/undirected/dfs.rs -------------------------------------------------------------------------------- /src/graph/undirected/dfs2.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/undirected/dfs2.rs -------------------------------------------------------------------------------- /src/graph/undirected/graph.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/undirected/graph.rs -------------------------------------------------------------------------------- /src/graph/undirected/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/undirected/mod.rs -------------------------------------------------------------------------------- /src/graph/util/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/util/mod.rs -------------------------------------------------------------------------------- /src/graph/util/parser.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/util/parser.rs -------------------------------------------------------------------------------- /src/graph/util/paths.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/util/paths.rs -------------------------------------------------------------------------------- /src/graph/util/symbol_graph.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/graph/util/symbol_graph.rs -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/lib.rs -------------------------------------------------------------------------------- /src/ll/cycle.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/ll/cycle.rs -------------------------------------------------------------------------------- /src/ll/kth2tail.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/ll/kth2tail.rs -------------------------------------------------------------------------------- /src/ll/linked_list.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/ll/linked_list.rs -------------------------------------------------------------------------------- /src/ll/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/ll/mod.rs -------------------------------------------------------------------------------- /src/ll/reverse.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/ll/reverse.rs -------------------------------------------------------------------------------- /src/math/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/math/mod.rs -------------------------------------------------------------------------------- /src/math/mysqrt.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/math/mysqrt.rs -------------------------------------------------------------------------------- /src/math/sparse_vector.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/math/sparse_vector.rs -------------------------------------------------------------------------------- /src/other/min_free.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/other/min_free.rs -------------------------------------------------------------------------------- /src/other/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod min_free; 2 | -------------------------------------------------------------------------------- /src/search/binary.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/search/binary.rs -------------------------------------------------------------------------------- /src/search/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod binary; 2 | -------------------------------------------------------------------------------- /src/sort/bubble.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/sort/bubble.rs -------------------------------------------------------------------------------- /src/sort/floyd.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/sort/floyd.rs -------------------------------------------------------------------------------- /src/sort/insert.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/sort/insert.rs -------------------------------------------------------------------------------- /src/sort/merge.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/sort/merge.rs -------------------------------------------------------------------------------- /src/sort/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/sort/mod.rs -------------------------------------------------------------------------------- /src/sort/quick.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/sort/quick.rs -------------------------------------------------------------------------------- /src/sort/selection.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/sort/selection.rs -------------------------------------------------------------------------------- /src/sort/shell.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/sort/shell.rs -------------------------------------------------------------------------------- /src/sort/tree_selection.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/sort/tree_selection.rs -------------------------------------------------------------------------------- /src/strings/alphabet.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/alphabet.rs -------------------------------------------------------------------------------- /src/strings/brute_force.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/brute_force.rs -------------------------------------------------------------------------------- /src/strings/count.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/count.rs -------------------------------------------------------------------------------- /src/strings/kmp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/kmp.rs -------------------------------------------------------------------------------- /src/strings/lsd.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/lsd.rs -------------------------------------------------------------------------------- /src/strings/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/mod.rs -------------------------------------------------------------------------------- /src/strings/msd.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/msd.rs -------------------------------------------------------------------------------- /src/strings/palindrome.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/palindrome.rs -------------------------------------------------------------------------------- /src/strings/quick3.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/quick3.rs -------------------------------------------------------------------------------- /src/strings/tries.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/tries.rs -------------------------------------------------------------------------------- /src/strings/tst.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/strings/tst.rs -------------------------------------------------------------------------------- /src/tree/binary/avl.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/avl.rs -------------------------------------------------------------------------------- /src/tree/binary/bst.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/bst.rs -------------------------------------------------------------------------------- /src/tree/binary/builder/level.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/builder/level.rs -------------------------------------------------------------------------------- /src/tree/binary/builder/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/builder/mod.rs -------------------------------------------------------------------------------- /src/tree/binary/builder/tournament.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/builder/tournament.rs -------------------------------------------------------------------------------- /src/tree/binary/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/mod.rs -------------------------------------------------------------------------------- /src/tree/binary/node.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/node.rs -------------------------------------------------------------------------------- /src/tree/binary/rb.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/rb.rs -------------------------------------------------------------------------------- /src/tree/binary/rb2.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/rb2.rs -------------------------------------------------------------------------------- /src/tree/binary/traverse.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/traverse.rs -------------------------------------------------------------------------------- /src/tree/binary/tree.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/src/tree/binary/tree.rs -------------------------------------------------------------------------------- /src/tree/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod binary; 2 | -------------------------------------------------------------------------------- /tests/playground.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/playground.rs -------------------------------------------------------------------------------- /tests/test_alphabet.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_alphabet.rs -------------------------------------------------------------------------------- /tests/test_bst_tree.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_bst_tree.rs -------------------------------------------------------------------------------- /tests/test_common.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_common.rs -------------------------------------------------------------------------------- /tests/test_common_heap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_common_heap.rs -------------------------------------------------------------------------------- /tests/test_directed_graph.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_directed_graph.rs -------------------------------------------------------------------------------- /tests/test_dp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_dp.rs -------------------------------------------------------------------------------- /tests/test_graph_mst.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_graph_mst.rs -------------------------------------------------------------------------------- /tests/test_linked_list.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_linked_list.rs -------------------------------------------------------------------------------- /tests/test_math.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_math.rs -------------------------------------------------------------------------------- /tests/test_rb_tree.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_rb_tree.rs -------------------------------------------------------------------------------- /tests/test_rb_tree2.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_rb_tree2.rs -------------------------------------------------------------------------------- /tests/test_search.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_search.rs -------------------------------------------------------------------------------- /tests/test_shortest_paths.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_shortest_paths.rs -------------------------------------------------------------------------------- /tests/test_sort.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_sort.rs -------------------------------------------------------------------------------- /tests/test_sparse_vec.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_sparse_vec.rs -------------------------------------------------------------------------------- /tests/test_strings.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_strings.rs -------------------------------------------------------------------------------- /tests/test_tree_traverse.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_tree_traverse.rs -------------------------------------------------------------------------------- /tests/test_undirected_graph.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/tests/test_undirected_graph.rs -------------------------------------------------------------------------------- /todos.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/douchuan/algorithm/HEAD/todos.md --------------------------------------------------------------------------------