Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/djeada/Algorithms-And-Data-Structures
/ functions
Functions
1,481 in github.com/djeada/Algorithms-And-Data-Structures
⨍
Functions
1,481
◇
Types & classes
357
↓ 4 callers
Function
allConstructTable
src/dynamic_programming/cpp/all_construct/src/all_construct.cpp:67
↓ 4 callers
Function
all_construct_basic
Find all ways to construct target from words in word_bank. Uses basic recursion without memoization. Args: target: The target s
src/dynamic_programming/python/all_construct/src/all_construct.py:4
↓ 4 callers
Function
all_construct_memo
Find all ways to construct target from words in word_bank. Uses memoization for efficient computation. Args: target: The target
src/dynamic_programming/python/all_construct/src/all_construct.py:33
↓ 4 callers
Function
all_construct_table
Find all ways to construct target from words in word_bank. Uses tabulation (bottom-up DP) for efficient computation. Args: targ
src/dynamic_programming/python/all_construct/src/all_construct.py:66
↓ 4 callers
Function
bestSumBasic
src/dynamic_programming/cpp/best_sum/src/best_sum.cpp:6
↓ 4 callers
Function
bestSumMemo
src/dynamic_programming/cpp/best_sum/src/best_sum.cpp:53
↓ 4 callers
Function
bestSumTabulation
src/dynamic_programming/cpp/best_sum/src/best_sum.cpp:109
↓ 4 callers
Function
bstToDoublyLinkedList
src/brain_teasers/cpp/bst_to_list/src/bst_to_list.cpp:4
↓ 4 callers
Function
canSumBasic
src/dynamic_programming/cpp/can_sum/src/can_sum.cpp:5
↓ 4 callers
Function
canSumMemo
src/dynamic_programming/cpp/can_sum/src/can_sum.cpp:25
↓ 4 callers
Function
canSumTable
src/dynamic_programming/cpp/can_sum/src/can_sum.cpp:62
↓ 4 callers
Function
can_construct_basic
Determine if target string can be constructed from words in word_bank. Uses basic recursion without memoization. Args: target:
src/dynamic_programming/python/can_construct/src/can_construct.py:4
↓ 4 callers
Function
can_construct_memo
Determine if target string can be constructed from words in word_bank. Uses memoization for efficient computation. Args: target
src/dynamic_programming/python/can_construct/src/can_construct.py:28
↓ 4 callers
Function
can_construct_table
Determine if target string can be constructed from words in word_bank. Uses tabulation (bottom-up DP) for efficient computation. Args:
src/dynamic_programming/python/can_construct/src/can_construct.py:64
↓ 4 callers
Function
can_sum_basic
Determine if it's possible to generate target sum using numbers from the list. Uses basic recursion without memoization. Args:
src/dynamic_programming/python/can_sum/src/can_sum.py:4
↓ 4 callers
Function
can_sum_memo
Determine if it's possible to generate target sum using numbers from the list. Uses memoization for efficient computation. Args:
src/dynamic_programming/python/can_sum/src/can_sum.py:26
↓ 4 callers
Function
can_sum_table
Determine if it's possible to generate target sum using numbers from the list. Uses tabulation (bottom-up DP) for efficient computation.
src/dynamic_programming/python/can_sum/src/can_sum.py:60
↓ 4 callers
Function
coin_change_basic
Find the minimum number of coins needed to make up the given amount using basic recursion. Args: amount: The target amount.
src/dynamic_programming/python/coins/src/coins.py:4
↓ 4 callers
Function
coin_change_memo
Find the minimum number of coins needed to make up the given amount using memoization. Args: amount: The target amount. coin
src/dynamic_programming/python/coins/src/coins.py:26
↓ 4 callers
Function
coin_change_tab
Find the minimum number of coins needed to make up the given amount using tabulation. Args: amount: The target amount. coins
src/dynamic_programming/python/coins/src/coins.py:59
↓ 4 callers
Method
contains
Check if the hash table contains a key.
src/collections_and_containers/python/hash_table/src/hash_table.py:65
↓ 4 callers
Method
contains
src/collections_and_containers/cpp/red_black_tree/src/red_black_tree.cpp:41
↓ 4 callers
Method
contains
src/collections_and_containers/cpp/hash_table/src/hash_table.cpp:80
↓ 4 callers
Function
countConstructBasic
src/dynamic_programming/cpp/count_construct/src/count_construct.cpp:5
↓ 4 callers
Function
countConstructMemo
src/dynamic_programming/cpp/count_construct/src/count_construct.cpp:23
↓ 4 callers
Function
countConstructTable
src/dynamic_programming/cpp/count_construct/src/count_construct.cpp:58
↓ 4 callers
Function
count_construct_basic
Count the number of ways to construct target from words in word_bank. Uses basic recursion without memoization. Args: target: T
src/dynamic_programming/python/count_construct/src/count_construct.py:4
↓ 4 callers
Function
count_construct_memo
Count the number of ways to construct target from words in word_bank. Uses memoization for efficient computation. Args: target:
src/dynamic_programming/python/count_construct/src/count_construct.py:27
↓ 4 callers
Function
count_construct_table
Count the number of ways to construct target from words in word_bank. Uses tabulation (bottom-up DP) for efficient computation. Args:
src/dynamic_programming/python/count_construct/src/count_construct.py:59
↓ 4 callers
Function
deletions_to_make_valid_parentheses
Return the minimum number of parentheses to delete to make the string valid. A string is valid if every opening parenthesis has a matching c
src/brain_teasers/python/deletions_to_make_valid_parentheses/src/deletions_to_make_valid_parentheses.py:6
↓ 4 callers
Method
empty
Check if the tree is empty.
src/collections_and_containers/python/binary_search_tree/src/binary_search_tree.py:111
↓ 4 callers
Method
empty
Check if the stack is empty.
src/collections_and_containers/python/stack/src/stack.py:15
↓ 4 callers
Method
empty
src/collections_and_containers/cpp/binary_search_tree/src/binary_search_tree.cpp:75
↓ 4 callers
Method
empty
src/collections_and_containers/cpp/linked_list/src/linked_list.cpp:119
↓ 4 callers
Function
fibonacciBasic
src/dynamic_programming/cpp/fibonacci/src/fibonacci.cpp:6
↓ 4 callers
Function
fibonacciMemo
src/dynamic_programming/cpp/fibonacci/src/fibonacci.cpp:17
↓ 4 callers
Function
fibonacciTable
src/dynamic_programming/cpp/fibonacci/src/fibonacci.cpp:39
↓ 4 callers
Function
find_best_move
Find the best move for the current player using minimax. Args: board: The current game board. player: The current player (-1
src/backtracking/python/minimax/src/minimax.py:113
↓ 4 callers
Function
find_best_move
src/backtracking/cpp/minimax/src/minimax.cpp:110
↓ 4 callers
Function
fleury
Find an Eulerian path using Fleury's algorithm. Fleury's algorithm works by: 1. Starting from a vertex with odd degree (or any vertex if
src/graphs/python/eulerian_path/src/eulerian_path.py:61
↓ 4 callers
Method
forward
Go forward in history by the given number of steps. Args: steps: Number of steps to go forward. Returns:
src/brain_teasers/python/design_browser_history/src/design_browser_history.py:46
↓ 4 callers
Method
forward
src/brain_teasers/cpp/design_browser_history/src/browser_history.cpp:21
↓ 4 callers
Method
get
Get a value from the cache. Args: key: The key to look up. Returns: The value if found, -1 otherwis
src/brain_teasers/python/lru_cache/src/lru_cache.py:92
↓ 4 callers
Function
gridTravelersBasic
src/dynamic_programming/cpp/grid_traveler/src/grid_travelers.cpp:17
↓ 4 callers
Function
gridTravelersMemo
src/dynamic_programming/cpp/grid_traveler/src/grid_travelers.cpp:28
↓ 4 callers
Function
gridTravelersTable
src/dynamic_programming/cpp/grid_traveler/src/grid_travelers.cpp:57
↓ 4 callers
Function
grid_traveller_basic
Count paths from top-left to bottom-right in a grid moving only right or down. Uses basic recursion without memoization. Args:
src/dynamic_programming/python/grid_traveler/src/grid_traveler.py:4
↓ 4 callers
Function
grid_traveller_memo
Count paths from top-left to bottom-right in a grid moving only right or down. Uses memoization for efficient computation. Args:
src/dynamic_programming/python/grid_traveler/src/grid_traveler.py:28
↓ 4 callers
Function
grid_traveller_table
Count paths from top-left to bottom-right in a grid moving only right or down. Uses tabulation (bottom-up DP) for efficient computation.
src/dynamic_programming/python/grid_traveler/src/grid_traveler.py:63
↓ 4 callers
Function
howSumBasic
src/dynamic_programming/cpp/how_sum/src/how_sum.cpp:5
↓ 4 callers
Function
howSumMemo
src/dynamic_programming/cpp/how_sum/src/how_sum.cpp:42
↓ 4 callers
Function
howSumTable
src/dynamic_programming/cpp/how_sum/src/how_sum.cpp:89
↓ 4 callers
Function
how_sum_table
Find any combination of numbers that add up to target. Uses tabulation (bottom-up DP) for efficient computation. Args: target:
src/dynamic_programming/python/how_sum/src/how_sum.py:71
↓ 4 callers
Method
is_left_red
Check if the left child is red.
src/collections_and_containers/python/red_black_tree/src/red_black_tree.py:23
↓ 4 callers
Function
is_player_winning
Check if the specified player has won the game. Args: board: The game board (3x3 grid). player: The player to check (-1 or 1
src/backtracking/python/minimax/src/minimax.py:4
↓ 4 callers
Function
is_player_winning
src/backtracking/cpp/minimax/src/minimax.cpp:8
↓ 4 callers
Function
k_closest_points
Return the K closest points to the origin (0, 0). Uses Euclidean distance to measure closeness. Args: points: List of (x, y) co
src/brain_teasers/python/k_closest_points/src/k_closest_points.py:8
↓ 4 callers
Function
lis_basic
Find the length of the longest increasing subsequence using basic recursion. Args: a: List of integers. i: Current index (us
src/dynamic_programming/python/longest_increasing_subarray/src/lis.py:4
↓ 4 callers
Function
lis_memo
Find the length of the longest increasing subsequence using memoization. Args: a: List of integers. i: Current index (used i
src/dynamic_programming/python/longest_increasing_subarray/src/lis.py:25
↓ 4 callers
Function
lis_tab
Find the length of the longest increasing subsequence using tabulation. Args: a: List of integers. Returns: Length of t
src/dynamic_programming/python/longest_increasing_subarray/src/lis.py:60
↓ 4 callers
Function
lowest_common_ancestor
Find the lowest common ancestor of two nodes in a binary tree. Args: root: The root of the binary tree. p_value: The value o
src/brain_teasers/python/lowest_common_ancestor/src/lowest_common_ancestor.py:46
↓ 4 callers
Function
range_sum_of_bst
Return the sum of values of all nodes within the range [low, high]. Uses the BST property to prune branches that cannot contain values i
src/brain_teasers/python/range_sum_of_bst/src/range_sum_of_bst.py:22
↓ 4 callers
Method
remove
Remove the first occurrence of an element.
src/collections_and_containers/python/linked_list/src/linked_list.py:99
↓ 4 callers
Method
resize
src/collections_and_containers/cpp/vector/src/vector.cpp:114
↓ 4 callers
Method
size
src/collections_and_containers/cpp/linked_list/src/linked_list.cpp:127
↓ 4 callers
Method
size
src/graphs/cpp/dijkstra/src/graph.cpp:123
↓ 4 callers
Method
size
src/graphs/cpp/dfs/src/graph.cpp:123
↓ 4 callers
Function
sparseVectorProduct
src/brain_teasers/cpp/sparse_vectors_product/src/sparse_vector.cpp:4
↓ 4 callers
Function
sparse_vectors_product
Compute the dot product of two sparse vectors. Sparse vectors are represented as dictionaries mapping indices to values. Only non-zero v
src/brain_teasers/python/sparse_vectors_product/src/sparse_vectors_product.py:6
↓ 3 callers
Function
_all_combinations
(combination: List[int])
src/backtracking/python/all_combinations/src/all_combinations.py:18
↓ 3 callers
Method
_assert_graph_contains_vertex
(self, vertex: Vertex)
src/graphs/python/a_star/src/graph.py:130
↓ 3 callers
Method
_assert_graph_contains_vertex
(self, vertex: Vertex)
src/graphs/python/bellman_ford/src/graph.py:130
↓ 3 callers
Method
_assert_graph_contains_vertex
(self, vertex: Vertex)
src/graphs/python/dijkstra/src/graph.py:130
↓ 3 callers
Method
_assert_graph_contains_vertex
(self, vertex: Vertex)
src/graphs/python/prim/src/graph.py:130
↓ 3 callers
Method
_assert_graph_contains_vertex
(self, vertex: Vertex)
src/graphs/python/bfs/src/graph.py:130
↓ 3 callers
Method
_assert_graph_contains_vertex
(self, vertex: Vertex)
src/graphs/python/graph/src/graph.py:130
↓ 3 callers
Method
_assert_graph_contains_vertex
(self, vertex: Vertex)
src/graphs/python/dfs/src/graph.py:130
↓ 3 callers
Method
_assert_graph_contains_vertex
(self, vertex: Vertex)
src/graphs/python/kruskal/src/graph.py:130
↓ 3 callers
Method
_swap
(self, i: int, j: int)
src/collections_and_containers/python/heap/src/heap.py:87
↓ 3 callers
Function
all_combinations
Generate all combinations of k numbers from 0 to n. Uses backtracking to find all combinations of size k from the range [0, n]. Args:
src/backtracking/python/all_combinations/src/all_combinations.py:4
↓ 3 callers
Function
all_combinations
src/backtracking/cpp/all_combinations/src/all_combinations.cpp:4
↓ 3 callers
Function
bst_to_double_linked_list
Convert a binary search tree to a doubly linked list. Performs an in-order traversal to maintain sorted order. Args: root: The
src/brain_teasers/python/bst_to_list/src/bst_to_list.py:99
↓ 3 callers
Method
clear
src/collections_and_containers/cpp/hash_table/src/hash_table.cpp:102
↓ 3 callers
Method
delete
Delete the given node from the list.
src/brain_teasers/python/lru_cache/src/lru_cache.py:46
↓ 3 callers
Function
deleteList
Helper to delete list
src/brain_teasers/cpp/bst_to_list/test/test_bst_to_list.cpp:14
↓ 3 callers
Function
deleteTree
Helper to delete tree
src/brain_teasers/cpp/lowest_common_ancestor/test/test_lca.cpp:5
↓ 3 callers
Function
deleteTree
Helper to delete tree
src/brain_teasers/cpp/binary_tree_right_side_view/test/test_right_side_view.cpp:5
↓ 3 callers
Function
deleteTree
Helper to delete tree
src/brain_teasers/cpp/range_sum_of_bst/test/test_range_sum_bst.cpp:5
↓ 3 callers
Method
dotProduct
src/brain_teasers/cpp/sparse_vectors_product/src/sparse_vector.cpp:30
↓ 3 callers
Method
empty
Check if the vector is empty.
src/collections_and_containers/python/vector/src/vector.py:35
↓ 3 callers
Method
empty
src/graphs/cpp/prim/src/graph.cpp:128
↓ 3 callers
Function
generate_words
Find all valid words from a board using DFS traversal. Starting from each cell, explores all paths through adjacent cells (including dia
src/backtracking/python/generating_words/src/generate_words.py:4
↓ 3 callers
Function
generate_words
src/backtracking/cpp/generating_words/src/generating_words.cpp:6
↓ 3 callers
Method
in_order_traversal
src/collections_and_containers/cpp/binary_search_tree/src/binary_search_tree.cpp:78
↓ 3 callers
Method
insert_before
Insert a new node with the given key-value pair before the given node.
src/brain_teasers/python/lru_cache/src/lru_cache.py:27
↓ 3 callers
Function
is_connected
Check if the graph is connected using BFS. Args: graph: The graph as an adjacency list. Returns: True if all vertices a
src/graphs/python/eulerian_path/src/eulerian_path.py:19
↓ 3 callers
Function
matrix_score
Calculate the score of a binary matrix. Each row is interpreted as a binary number, and the score is their sum. Args: matrix: A
src/brain_teasers/python/score_after_flipping_matrix/src/score_after_flipping_matrix.py:6
↓ 3 callers
Method
pop_back
Remove and return the last element.
src/collections_and_containers/python/linked_list/src/linked_list.py:41
↓ 3 callers
Method
pop_back
src/collections_and_containers/cpp/linked_list/src/linked_list.cpp:60
↓ 3 callers
Method
pop_front
Remove and return the first element.
src/collections_and_containers/python/linked_list/src/linked_list.py:60
← previous
next →
201–300 of 1,481, ranked by callers