↓ 1 callersFunctionpostorder
Post-order traversal visits left subtree, right subtree, root node.
>>> list(postorder(make_tree()))
[4, 5, 2, 3, 1]
data_structures/binary_tree/binary_tree_traversals.py:46
↓ 1 callersFunctionpreorder
Pre-order traversal visits root node, left subtree, right subtree.
>>> list(preorder(make_tree()))
[1, 2, 4, 5, 3]
data_structures/binary_tree/binary_tree_traversals.py:33
↓ 1 callersFunctionpreprocess
Preprocess the edge array
>>> preprocess([['ab-e1', 'ac-e3', 'ad-e5', 'bc-e4', 'bd-e2', 'be-e6', 'bh-e12',
... 'cd-e2', '
graphs/frequent_pattern_graph_miner.py:209
↓ 1 callersFunctionprime_sieve
Returns a list with all prime numbers up to n.
>>> prime_sieve(50)
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
>>>
maths/sieve_of_eratosthenes.py:19
↓ 1 callersFunctionprime_sieve_eratosthenes Print the prime numbers up to n >>> prime_sieve_eratosthenes(10) [2, 3, 5, 7] >>> prime_sieve_eratosthenes(20) [2, 3, 5, 7, 11,
maths/prime_sieve_eratosthenes.py:15
↓ 1 callersFunctionprint_binary_search_tree Recursive function to print a BST from a root table. >>> key = [3, 8, 9, 10, 17, 21] >>> root = [[0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 3],
dynamic_programming/optimal_binary_search_tree.py:38
↓ 1 callersFunctionprint_max_activities >>> start = [1, 3, 0, 5, 8, 5] >>> finish = [2, 4, 6, 7, 9, 9] >>> print_max_activities(start, finish) The following activities are s
other/activity_selection.py:11
↓ 1 callersFunctionprisms_algorithm >>> adjacency_list = {0: [[1, 1], [3, 3]], ... 1: [[0, 1], [2, 6], [3, 5], [4, 1]], ... 2: [[1, 6], [
graphs/minimum_spanning_tree_prims.py:75
↓ 1 callersFunctionquery >>> query(build_sparse_table([8, 1, 0, 3, 4, 9, 3]), 0, 4) 0 >>> query(build_sparse_table([8, 1, 0, 3, 4, 9, 3]), 4, 6) 3 >>> que
data_structures/arrays/sparse_table.py:61
↓ 1 callersFunctionrec_ternary_searchRecursive method of the ternary search algorithm. >>> test_list = [0, 1, 2, 8, 13, 17, 19, 32, 42] >>> rec_ternary_search(0, len(test_list),
searches/ternary_search.py:112