MCPcopy Create free account

hub / github.com/djeada/Algorithms-And-Data-Structures / functions

Functions1,481 in github.com/djeada/Algorithms-And-Data-Structures

↓ 3 callersMethodpop_front
src/collections_and_containers/cpp/linked_list/src/linked_list.cpp:78
↓ 3 callersFunctionproduct_of_array_except_self
Return an array where each element is the product of all other elements. This algorithm runs in O(n) time without using division. Args:
src/brain_teasers/python/array_product/src/array_product.py:6
↓ 3 callersFunctionrandomize_array
Randomize an array of integers. Ensures that no element remains in its original position (when possible). Args: array: List of
src/brain_teasers/python/randomize_array/src/randomize_array.py:8
↓ 3 callersFunctionrandomize_array
Randomize an array of integers in place. Ensure that no two integers are in the same position as they were in the original array. :param
src/brain_teasers/cpp/bst_to_list/src/randomize_array.py:8
↓ 3 callersMethodremove
Remove a value from the tree.
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:44
↓ 3 callersMethodremove
Remove a key-value pair.
src/collections_and_containers/python/hash_table/src/hash_table.py:43
↓ 3 callersMethodrotate_left
Perform a left rotation.
src/collections_and_containers/python/red_black_tree/src/red_black_tree.py:167
↓ 3 callersMethodrotate_right
Perform a right rotation.
src/collections_and_containers/python/red_black_tree/src/red_black_tree.py:176
↓ 3 callersFunctionscore_after_flipping_matrix
Find the maximum score achievable by flipping rows and columns. Args: matrix: A 2D list of 0s and 1s. Returns: The maxi
src/brain_teasers/python/score_after_flipping_matrix/src/score_after_flipping_matrix.py:55
↓ 3 callersFunctionsearch
(u: Vertex)
src/graphs/python/dfs/src/dfs.py:38
↓ 3 callersFunctionsearch
Search for all occurrences of pattern in text using KMP algorithm. The Knuth-Morris-Pratt algorithm uses a failure function to avoid red
src/dynamic_programming/python/kmp/src/kmp.py:4
↓ 3 callersFunctionsearch
src/dynamic_programming/cpp/kmp/src/kmp.cpp:4
↓ 3 callersMethodsize
Return the number of elements in the vector.
src/collections_and_containers/python/vector/src/vector.py:31
↓ 3 callersFunctionsubarray_sum
Calculate the sum of elements in a subarray. Args: array: The input array of integers. start: The starting index (inclusive)
src/brain_teasers/python/subarray_sum/src/subarray_sum.py:6
↓ 2 callersMethod__init__
(self, comp: Callable[[Any, Any], bool])
src/collections_and_containers/python/heap/src/heap.py:12
↓ 2 callersFunctionall_permutations
src/backtracking/cpp/all_permutations/src/all_permutations.cpp:4
↓ 2 callersMethodbalance
Balance the tree at node p.
src/collections_and_containers/python/avl_tree/src/avl_tree.py:144
↓ 2 callersMethodbalance
Balance the tree at node p.
src/collections_and_containers/python/red_black_tree/src/red_black_tree.py:207
↓ 2 callersFunctioncoinChangeBasic
src/dynamic_programming/cpp/coins/src/coin_change.cpp:6
↓ 2 callersFunctioncoinChangeMemo
src/dynamic_programming/cpp/coins/src/coin_change.cpp:25
↓ 2 callersFunctioncoinChangeTable
src/dynamic_programming/cpp/coins/src/coin_change.cpp:57
↓ 2 callersMethodcontains
Check if the tree contains a value.
src/collections_and_containers/python/avl_tree/src/avl_tree.py:72
↓ 2 callersMethodcontains
Check if the tree contains a value.
src/collections_and_containers/python/red_black_tree/src/red_black_tree.py:92
↓ 2 callersMethodcontains
src/collections_and_containers/cpp/avl_tree/src/avl_tree.cpp:30
↓ 2 callersMethodcontains
Check if the graph contains the given vertex.
src/graphs/python/a_star/src/graph.py:94
↓ 2 callersMethodcontains
Check if the graph contains the given vertex.
src/graphs/python/bellman_ford/src/graph.py:94
↓ 2 callersMethodcontains
Check if the graph contains the given vertex.
src/graphs/python/dijkstra/src/graph.py:94
↓ 2 callersMethodcontains
Check if the graph contains the given vertex.
src/graphs/python/bfs/src/graph.py:94
↓ 2 callersMethodcontains
Check if the graph contains the given vertex.
src/graphs/python/graph/src/graph.py:94
↓ 2 callersMethodcontains
Check if the graph contains the given vertex.
src/graphs/python/dfs/src/graph.py:94
↓ 2 callersMethodcontains
src/graphs/cpp/a_star/src/graph.cpp:127
↓ 2 callersMethodcontains
src/graphs/cpp/bellman_ford/src/graph.cpp:105
↓ 2 callersMethodcontains
src/graphs/cpp/dijkstra/src/graph.cpp:105
↓ 2 callersMethodcontains
src/graphs/cpp/bfs/src/graph.cpp:105
↓ 2 callersMethodcontains
src/graphs/cpp/dfs/src/graph.cpp:105
↓ 2 callersFunctioncontainsSamePoints
Helper to check if two vectors of points contain the same points (order independent)
src/brain_teasers/cpp/k_closest_points/test/test_k_closest_points.cpp:6
↓ 2 callersMethodcurrent
src/brain_teasers/cpp/design_browser_history/src/browser_history.cpp:27
↓ 2 callersFunctiondeleteTree
Helper to delete tree
src/brain_teasers/cpp/bst_to_list/test/test_bst_to_list.cpp:5
↓ 2 callersMethodedges
Return a list of all edges in the graph.
src/graphs/python/bellman_ford/src/graph.py:85
↓ 2 callersMethodedgesFromVertex
src/graphs/cpp/prim/src/graph.cpp:89
↓ 2 callersFunctionedges_from_adjacency
Convert adjacency list to list of edges. Args: graph: The graph as an adjacency list. Returns: List of (source, destina
src/graphs/python/eulerian_path/src/eulerian_path.py:48
↓ 2 callersMethodedges_from_vertex
Return all edges originating from the given vertex.
src/graphs/python/prim/src/graph.py:89
↓ 2 callersMethodempty
src/collections_and_containers/cpp/vector/src/vector.cpp:87
↓ 2 callersFunctionfind_hamiltonian_paths
Find all Hamiltonian paths in the graph. A Hamiltonian path visits each vertex exactly once. Args: G: The graph to search.
src/backtracking/python/hamiltonian_paths/src/hamiltonian_paths.py:32
↓ 2 callersFunctionfind_hamiltonian_paths
src/backtracking/cpp/hamiltonian_paths/src/hamiltonian_paths.cpp:21
↓ 2 callersFunctionfind_k_colorable_configurations
Find all valid k-colorable configurations of the graph. A k-colorable configuration assigns one of k colors to each vertex such that no
src/backtracking/python/k_colorable_configurations/src/k_colorable_configurations.py:32
↓ 2 callersFunctionfind_k_colorable_configurations
src/backtracking/cpp/k_colorable_configurations/src/k_colorable_configurations.cpp:22
↓ 2 callersFunctionfind_longest_prefix_suffix
Compute the longest proper prefix which is also a suffix.
src/dynamic_programming/python/kmp/src/kmp.py:19
↓ 2 callersFunctionfind_node
Find a node with the given value in the tree. Args: root: The root of the tree to search. value: The value to find. Ret
src/brain_teasers/python/lowest_common_ancestor/src/lowest_common_ancestor.py:22
↓ 2 callersMethodget
Get the value for a key.
src/collections_and_containers/python/hash_table/src/hash_table.py:33
↓ 2 callersFunctionhow_sum_basic
Find any combination of numbers that add up to target. Uses basic recursion without memoization. Args: target: The target sum t
src/dynamic_programming/python/how_sum/src/how_sum.py:4
↓ 2 callersMethodin_order_traversal
Return elements in in-order traversal (left, root, right).
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:115
↓ 2 callersMethodisEmpty
src/collections_and_containers/cpp/queue/src/queue.cpp:82
↓ 2 callersFunctionisPalindrome
Helper function to check if substring is palindrome
src/brain_teasers/cpp/is_palindrome_after_char_deletion/src/palindrome.cpp:4
↓ 2 callersFunctionis_colorable
Check if assigning color to vertex v is valid.
src/backtracking/python/k_colorable_configurations/src/k_colorable_configurations.py:63
↓ 2 callersMethodis_right_red
Check if the right child is red.
src/collections_and_containers/python/red_black_tree/src/red_black_tree.py:27
↓ 2 callersFunctionkruskal
Find the minimum spanning tree weight using Kruskal's algorithm. Uses Union-Find data structure with path compression and union by rank
src/graphs/python/kruskal/src/kruskal.py:8
↓ 2 callersFunctionleft_child
(i: int)
src/sorting/python/heap_sort/src/heap_sort.py:28
↓ 2 callersFunctionlistToVector
src/brain_teasers/cpp/bst_to_list/src/bst_to_list.cpp:46
↓ 2 callersFunctionlongestCommonSubsequenceBasic
src/dynamic_programming/cpp/longest_common_subsequence/src/longest_common_subsequence.cpp:17
↓ 2 callersFunctionlongestCommonSubsequenceMemo
src/dynamic_programming/cpp/longest_common_subsequence/src/longest_common_subsequence.cpp:41
↓ 2 callersFunctionlongestCommonSubsequenceTable
src/dynamic_programming/cpp/longest_common_subsequence/src/longest_common_subsequence.cpp:78
↓ 2 callersFunctionlongestIncreasingSubarrayBasic
src/dynamic_programming/cpp/longest_increasing_subarray/src/longest_increasing_subarray.cpp:17
↓ 2 callersFunctionlongestIncreasingSubarrayMemo
src/dynamic_programming/cpp/longest_increasing_subarray/src/longest_increasing_subarray.cpp:39
↓ 2 callersFunctionlongestIncreasingSubarrayTable
src/dynamic_programming/cpp/longest_increasing_subarray/src/longest_increasing_subarray.cpp:71
↓ 2 callersFunctionneighbors
Generate all valid neighboring positions.
src/backtracking/python/generating_words/src/generate_words.py:25
↓ 2 callersFunctionnumber_of_decimal_places
(s: str)
src/brain_teasers/python/add_string_numbers/src/add_string_numbers.py:25
↓ 2 callersFunctionprim
Find the minimum spanning tree weight using Prim's algorithm. Uses a priority queue (min-heap) for efficient O((V+E) log V) performance.
src/graphs/python/prim/src/prim.py:10
↓ 2 callersFunctionrecurse
(target: str)
src/dynamic_programming/python/all_construct/src/all_construct.py:18
↓ 2 callersFunctionrecursion
(a: str, b: str, m: int, n: int)
src/dynamic_programming/python/longest_common_subsequence/src/lcs.py:13
↓ 2 callersMethodremove
src/collections_and_containers/cpp/linked_list/src/linked_list.cpp:129
↓ 2 callersMethodreserve
Reserve capacity for at least 'size' elements.
src/collections_and_containers/python/vector/src/vector.py:87
↓ 2 callersMethodresize
Resize the vector to contain 'size' elements.
src/collections_and_containers/python/vector/src/vector.py:65
↓ 2 callersFunctionright_child
(i: int)
src/sorting/python/heap_sort/src/heap_sort.py:31
↓ 2 callersMethodrotate_left
Perform a left rotation.
src/collections_and_containers/python/avl_tree/src/avl_tree.py:163
↓ 2 callersMethodrotate_right
Perform a right rotation.
src/collections_and_containers/python/avl_tree/src/avl_tree.py:170
↓ 2 callersMethodsize
Return the number of vertices in the graph.
src/graphs/python/graph/src/graph.py:117
↓ 2 callersFunctionsquaredDistance
Helper function to calculate squared distance from origin
src/brain_teasers/cpp/k_closest_points/src/k_closest_points.cpp:6
↓ 2 callersFunctiontoggle_column
Toggle all values in a column (0 becomes 1, 1 becomes 0). Args: matrix: The matrix to modify. column: The column index to to
src/brain_teasers/python/score_after_flipping_matrix/src/score_after_flipping_matrix.py:42
↓ 2 callersFunctiontoggle_row
Toggle all values in a row (0 becomes 1, 1 becomes 0). Args: matrix: The matrix to modify. row: The row index to toggle.
src/brain_teasers/python/score_after_flipping_matrix/src/score_after_flipping_matrix.py:29
↓ 2 callersFunctiontopological_sort
Perform topological sort on a directed acyclic graph (DAG). Args: G: The directed graph to sort. Returns: A list of ver
src/backtracking/python/topological_sort/src/topological_sort.py:30
↓ 2 callersMethodtopological_sort
src/backtracking/cpp/topological_sort/src/topological_sort.cpp:20
↓ 1 callersFunctionTEST
src/backtracking/cpp/generating_words/test/test_generating_words.cpp:17
↓ 1 callersFunction_backtrack
(start_index: int)
src/backtracking/python/all_permutations/src/all_permutations.py:29
↓ 1 callersMethod_bubble_down
(self, index: int)
src/collections_and_containers/python/heap/src/heap.py:66
↓ 1 callersMethod_bubble_up
(self, index: int)
src/collections_and_containers/python/heap/src/heap.py:58
↓ 1 callersMethod_contains
(self, v: Any, p: Optional[Node])
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:81
↓ 1 callersFunction_generate_words
DFS implementation to find words.
src/backtracking/python/generating_words/src/generate_words.py:40
↓ 1 callersMethod_height
(self, p: Optional[Node])
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:102
↓ 1 callersMethod_in_order_traversal
(self, p: Optional[Node], v: list[Any])
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:121
↓ 1 callersMethod_insert
(self, v: Any, p: Node)
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:32
↓ 1 callersMethod_left
(self, index: int)
src/collections_and_containers/python/heap/src/heap.py:81
↓ 1 callersFunction_lowest_common_ancestor
( root: Optional[TreeNode], p: TreeNode, q: TreeNode )
src/brain_teasers/python/lowest_common_ancestor/src/lowest_common_ancestor.py:60
↓ 1 callersMethod_parent
(self, index: int)
src/collections_and_containers/python/heap/src/heap.py:78
↓ 1 callersMethod_post_order_traversal
(self, p: Optional[Node], v: list[Any])
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:147
↓ 1 callersMethod_pre_order_traversal
(self, p: Optional[Node], v: list[Any])
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:134
↓ 1 callersFunction_quick_sort
(arr: List[T], start: int, stop: int)
src/sorting/python/quick_sort/src/quick_sort.py:44
↓ 1 callersFunction_quick_sort_three_way
(arr: List[T], start: int, stop: int)
src/sorting/python/quick_sort/src/quick_sort.py:76
↓ 1 callersMethod_remove
(self, v: Any, p: Optional[Node])
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:52
↓ 1 callersMethod_right
(self, index: int)
src/collections_and_containers/python/heap/src/heap.py:84
← previousnext →301–400 of 1,481, ranked by callers