↓ 1 callersFunctionremove_word Remove a word from the given position. >>> puzzle = [ ... ['w', '', '', ''], ... ['o', '', '', ''], ... ['r', '', ''
backtracking/crossword_puzzle_solver.py:59
↓ 1 callersFunctionreverse_inorder
Reverse in-order traversal visits right subtree, root node, left subtree.
>>> list(reverse_inorder(make_tree()))
[3, 1, 5, 2, 4]
data_structures/binary_tree/binary_tree_traversals.py:72
↓ 1 callersFunctionrotate_180 >>> rotate_180(make_matrix()) [[16, 15, 14, 13], [12, 11, 10, 9], [8, 7, 6, 5], [4, 3, 2, 1]] >>> rotate_180(make_matrix()) == reverse_co
matrix/rotate_matrix.py:40
↓ 1 callersFunctionrotate_270 >>> rotate_270(make_matrix()) [[13, 9, 5, 1], [14, 10, 6, 2], [15, 11, 7, 3], [16, 12, 8, 4]] >>> rotate_270(make_matrix()) == transpose(
matrix/rotate_matrix.py:52
↓ 1 callersFunctionrotate_90 >>> rotate_90(make_matrix()) [[4, 8, 12, 16], [3, 7, 11, 15], [2, 6, 10, 14], [1, 5, 9, 13]] >>> rotate_90(make_matrix()) == transpose(re
matrix/rotate_matrix.py:28
↓ 1 callersFunctionscalar_multiply >>> scalar_multiply([[1,2],[3,4]],5) [[5, 10], [15, 20]] >>> scalar_multiply([[1.4,2.3],[3,4]],5) [[7.0, 11.5], [15, 20]]
matrix/matrix_operation.py:50
↓ 1 callersFunctionsearch Search for a path on a grid avoiding obstacles. >>> grid = [[0, 1, 0, 0, 0, 0], ... [0, 1, 0, 0, 0, 0], ... [0, 1, 0,
graphs/a_star.py:12
↓ 1 callersFunctionsearch function to search a number in a list using Binary Search. >>> search(3, [1, 2, 3]) True >>> search(4, [1, 2, 3]) False >>> s
project_euler/problem_049/sol1.py:71
↓ 1 callersMethodsearch >>> tree = BinarySearchTree().insert(10, 20, 30, 40, 50) >>> tree.search(10) {'10': (None, {'20': (None, {'30': (None, {'40':
data_structures/binary_tree/binary_search_tree.py:200
↓ 1 callersFunctionsearch_in_a_sorted_matrix >>> search_in_a_sorted_matrix( ... [[2, 5, 7], [4, 8, 13], [9, 11, 15], [12, 17, 20]], 3, 3, 5) Key 5 found at row- 1 column- 2 >
matrix/searching_in_sorted_matrix.py:4
↓ 1 callersMethodset_planet Ease of access for testing >>> wt = WaTor(WIDTH, HEIGHT) >>> planet = [ ... [None, None, None], ... [None, E
cellular_automata/wa_tor.py:132
↓ 1 callersFunctionsieve
Segmented Sieve.
Examples:
>>> sieve(8)
[2, 3, 5, 7]
>>> sieve(27)
[2, 3, 5, 7, 11, 13, 17, 19, 23]
>>> siev
maths/segmented_sieve.py:6
↓ 1 callersFunctionsimplify
>>> simplify([[1, 2, 3], [4, 5, 6]])
[[1.0, 2.0, 3.0], [0.0, 0.75, 1.5]]
>>> simplify([[5, 2, 5], [5, 1, 10]])
[[1.0, 0.4, 1.0],
maths/simultaneous_linear_equation_solver.py:12
↓ 1 callersFunctionsock_merchant >>> sock_merchant([10, 20, 20, 10, 10, 30, 50, 10, 20]) 3 >>> sock_merchant([1, 1, 3, 3]) 2
maths/sock_merchant.py:4