MCPcopy Create free account

hub / github.com/douchuan/algorithm / functions

Functions655 in github.com/douchuan/algorithm

Methodfrom
(nv: usize)
src/graph/shortest/ew_digraph.rs:54
Methodget
(&self, key: &K)
src/tree/binary/bst.rs:42
Methodget
(&self, key: &K)
src/tree/binary/rb2.rs:132
Methodget_e
(&self)
src/graph/util/parser.rs:66
Methodget_entry
(&self)
src/tree/binary/node.rs:289
Functionhas_cycle
使用双指针,一个指针每次移动一个节点,一个指针每次移动两个节点, 如果存在环,那么这两个指针一定会相遇。
src/ll/cycle.rs:11
Methodhas_cycle
Returns true if the graph G has a cycle.
src/graph/undirected/cycle.rs:36
Methodhas_cycle
does G have a directed cycle?
src/graph/directed/cycle.rs:48
Methodhas_opportunity
(&self)
src/graph/shortest/arbitrage.rs:30
Methodhas_order
Does the digraph have a topological order? true if the digraph has a topological order (or equivalently, if the digraph is a DAG), and false otherwise
src/graph/directed/sort.rs:22
Methodhas_path
Is there a path from the vertex s to vertex t?
src/graph/shortest/dijkstra_sp.rs:152
Functionheapify
()
tests/test_common_heap.rs:4
Functionheight
()
tests/test_rb_tree2.rs:6
Methodid
component identifier for v ( between 0 and count()-1 )
src/graph/undirected/cc.rs:59
Methodin_degree
(&self, v: usize)
src/graph/shortest/ew_digraph.rs:48
Functionindex_max_pq
()
tests/test_common.rs:125
Functionindex_min_pq
()
tests/test_common.rs:91
Functioninorder_iter
()
tests/test_tree_traverse.rs:98
Functioninorder_recursive
()
tests/test_tree_traverse.rs:111
Functioninsert
()
tests/test_common_heap.rs:76
Methodinsert
(&mut self, key: K)
src/common/max_heap.rs:57
Methodinsert
(&mut self, key: K, val: V)
src/tree/binary/bst.rs:28
Functioninsert1
()
tests/test_rb_tree2.rs:19
Functioninsert2
()
tests/test_rb_tree2.rs:32
Functioninsert_sort_dth
()
tests/test_sort.rs:42
Methodinto_vec
(mut self)
src/common/top_m.rs:28
Functionis23
Does the tree have no red right links, and at most one (left) red links in a row on any path?
src/tree/binary/rb2.rs:402
Functionis_balance
does every path from the root to a leaf have the given number of black links?
src/tree/binary/rb2.rs:358
Methodis_bipartite
(&self)
src/graph/undirected/bipartite.rs:47
Methodis_black
(&self)
src/tree/binary/node.rs:215
Functionis_bst
is the tree rooted at x a BST with all keys strictly between min and max (if min or max is null, treat as empty constraint)
src/tree/binary/bst.rs:262
Functionis_bst
()
tests/test_bst_tree.rs:88
Methodis_empty
Is this symbol table empty
src/strings/tries.rs:70
Methodis_empty
(&self)
src/ll/linked_list.rs:42
Methodis_empty
(&self)
src/common/stack.rs:35
Methodis_empty
Returns true if this priority queue is empty
src/common/priority_queue.rs:65
Methodis_empty
Returns true if this queue is empty
src/common/queue.rs:45
Functionis_palindrome
(word: &str)
src/strings/palindrome.rs:1
Methoditer
(&self)
src/ll/linked_list.rs:91
Methoditer
Returns an iterator that iterates over the items in this queue in FIFO order
src/common/queue.rs:35
Methoditerate
# Safety This is highly unsafe, due to pointer 时间复杂度 O(n), 空间复杂度 O(n)
src/tree/binary/traverse.rs:119
Functionkeys
()
tests/test_rb_tree2.rs:108
Methodkeys
Returns all keys in the symbol table
src/strings/tries.rs:106
Methodkeys
(&self)
src/tree/binary/rb2.rs:187
Methodkeys_that_match
Returns all of the keys in the symbol table that match *pattern*, where the character '.' is interpreted as a wildcard character.
src/strings/tries.rs:121
Functionkmp
()
tests/test_strings.rs:353
Functionlarge_merge_v1
(b: &mut Bencher)
benches/sort.rs:19
Functionlarge_merge_v2
(b: &mut Bencher)
benches/sort.rs:63
Functionlarge_merge_v3
(b: &mut Bencher)
benches/sort.rs:107
Functionlarge_quick
(b: &mut Bencher)
benches/sort.rs:151
Functionlarge_quick_3way
(b: &mut Bencher)
benches/sort.rs:160
Functionlarge_selection_sort
(b: &mut Bencher)
benches/sort.rs:212
Functionlarge_selection_tree_selection
(b: &mut Bencher)
benches/sort.rs:221
Functionlarge_sorted_asc_merge_v1
(b: &mut Bencher)
benches/sort.rs:28
Functionlarge_sorted_asc_merge_v2
(b: &mut Bencher)
benches/sort.rs:72
Functionlarge_sorted_asc_merge_v3
(b: &mut Bencher)
benches/sort.rs:116
Functionlarge_sorted_asc_quick
(b: &mut Bencher)
benches/sort.rs:169
Functionlarge_sorted_desc_merge_v1
(b: &mut Bencher)
benches/sort.rs:37
Functionlarge_sorted_desc_merge_v2
(b: &mut Bencher)
benches/sort.rs:81
Functionlarge_sorted_desc_merge_v3
(b: &mut Bencher)
benches/sort.rs:125
Functionlarge_sorted_desc_quick
(b: &mut Bencher)
benches/sort.rs:178
Methodlast
(&self)
src/ll/linked_list.rs:104
Functionlazy_Prim_mst
()
tests/test_graph_mst.rs:31
Methodlen
(&self)
src/ll/linked_list.rs:38
Methodlen
Returns the number of keys on this priority queue
src/common/priority_queue.rs:70
Methodlen
Returns the number of items in this queue
src/common/queue.rs:40
Functionlevelorder2_iter
()
tests/test_tree_traverse.rs:156
Functionlevelorder2_traverse
()
tests/test_tree_traverse.rs:164
Functionlevelorder_iter
()
tests/test_tree_traverse.rs:140
Functionlevelorder_traverse
()
tests/test_tree_traverse.rs:148
Functionlevelorder_zigzag_iter
()
tests/test_tree_traverse.rs:172
Functionlevelorder_zigzag_traverse
()
tests/test_tree_traverse.rs:180
Methodlg_r
Returns the binary logarithm of the number of characters in this alphabet
src/strings/alphabet.rs:137
Functionlocate_file
()
tests/test_undirected_graph.rs:179
Methodlongest_prefix_of
Returns the string in the symbol table that is the longest prefix of query, or None, if no such string.
src/strings/tst.rs:84
Methodlongest_prefix_of
Returns the string in the symbol table that is the longest prefix of *query*, or None, if no such string.
src/strings/tries.rs:130
Functionmagnitude
()
tests/test_sparse_vec.rs:13
Methodmagnitude
Returns the magnitude of this vector. This is also known as the L2 norm or the Euclidean norm.
src/math/sparse_vector.rs:76
Functionmain
()
build.rs:3
Functionmain
()
examples/quadratic.rs:2
Functionmake_changes
()
tests/test_dp.rs:4
Functionmake_changes_classic
(b: &mut Bencher)
benches/dp.rs:10
Functionmake_changes_fail
()
tests/test_dp.rs:26
Functionmake_changes_iter
(b: &mut Bencher)
benches/dp.rs:16
Methodmarked
(&self, v: usize)
src/graph/undirected/dfs2.rs:24
Methodmarked
is v connected to s?
src/graph/undirected/dfs.rs:33
Methodmax_degree
compute maximum degree
src/graph/undirected/graph.rs:79
Functionmax_pq
()
tests/test_common.rs:71
Functionmerge
()
tests/test_sort.rs:72
Functionmfv1
最小可用ID 这道题目来自 Richard Bird 书中的第一章 [1]。 现代社会中,有很多服务依赖一种被称为ID的概念。 例如身份证就是一种ID,银行账户也是一种ID,电 话号码本质上也是一种ID。假设我们使用非负整数作 为某个系统的的ID,所有用户都由一个ID唯一确定。 任何时间,这个系统
src/other/min_free.rs:19
Functionmin_max
()
tests/test_rb_tree2.rs:98
Functionmin_pq
()
tests/test_common.rs:51
Methodminimal
()
src/tree/binary/builder/tournament.rs:31
Methodmorris
# Safety This is highly unsafe, due to pointer 时间复杂度 O(n), 空间复杂度 O(1) 大概思路:当一个node有left subtree时,需要遍历left subtree 的各节点,完成left subtree的遍历,需要回溯到node,
src/tree/binary/traverse.rs:151
Methodnew
(c: usize)
src/strings/tst.rs:248
Methodnew
(val: Option<T>)
src/strings/tries.rs:287
Methodnew
(element: T)
src/ll/linked_list.rs:11
Methodnew
(mut keys: Vec<K>)
src/common/max_heap.rs:25
Methodnew
(n: usize)
src/common/uf.rs:88
Methodnew
(cap: usize, comparator: Comparator<T>)
src/common/priority_queue.rs:51
← previousnext →401–500 of 655, ranked by callers