Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/akzare/Algorithms
/ functions
Functions
688 in github.com/akzare/Algorithms
⨍
Functions
688
◇
Types & classes
127
Method
add
Add an element to the tail of the linked list, O(1)
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:76
Method
add
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:148
Method
addAt
Add an element at a specified index
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:109
Method
addRandomEdges
src/test/cpp/algorithms/graphtheory/FloydWarshallSolverTest.cpp:56
Method
adjustCapacity
Adjusts the capacity of the hash table after it's been made larger. This is important to be able to override because the size of the hashtable control
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:111
Method
adjustIndex
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:103
Method
begin
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:325
Method
bfs
Perform a breadth first search on a graph a starting node 'start'.
src/main/cpp/algorithms/graphtheory/BreadthFirstSearchAdjacencyListIterative.h:110
Function
bfs_test
BFS example.
src/main/cpp/algorithms/graphtheory/BreadthFirstSearchAdjacencyListIterative.h:207
Method
binarySearch
src/main/cpp/algorithms/search/BinarySearch.h:43
Method
binarySearchIter
A iterative binary search function. It returns location of x in given array arr[l..r] if present, otherwise -1
src/main/cpp/algorithms/search/BinarySearch.h:106
Method
binarySearchRecur
A recursive binary search function. It returns location of x in given array arr[l..r] is present, otherwise -1
src/main/cpp/algorithms/search/BinarySearch.h:75
Method
bubbleSort
src/main/cpp/algorithms/sorting/BubbleSort.h:44
Method
bucketSort
src/main/cpp/algorithms/sorting/BucketSort.h:52
Method
buildTree
Do dfs to construct rooted tree.
src/main/cpp/algorithms/graphtheory/treealgorithms/RootingTree.h:161
Method
clearBit
Sets the i'th bit to zero
src/main/python/algorithms/other/BitManipulations.py:31
Method
coinChange
src/main/cpp/algorithms/dp/CoinChange.h:42
Method
coinChangeRecursive
The recursive approach has the advantage that it does not have to visit all possible states like the tabular approach does. This can speedup things es
src/main/cpp/algorithms/dp/CoinChange.h:97
Method
coinChangeSpaceEfficient
src/main/cpp/algorithms/dp/CoinChange.h:74
Method
combinations
src/main/cpp/algorithms/other/UniqueCombinations.h:40
Method
combinations
This method generates all bit sets of size n where r bits are set to one. The result is returned as a list of integer masks.
src/main/cpp/algorithms/graphtheory/TspDynamicProgrammingIterative.h:176
Method
computeMatchingCost
src/test/cpp/algorithms/dp/MinimumWeightPerfectMatchingTest.cpp:53
Method
contains
Check if a value is contained within the linked list
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:317
Method
countingSort
Sorts values in the range of [minVal, maxVal] in O(n+maxVal-maxVal)
src/main/cpp/algorithms/sorting/CountingSort.h:51
Method
createGraph
Creates a graph with n nodes. The adjacency matrix is constructed such that the value of going from a node to itself is 0.
src/main/cpp/algorithms/graphtheory/FloydWarshallSolver.h:214
Method
createMatrix
src/test/cpp/algorithms/graphtheory/FloydWarshallSolverTest.cpp:73
Method
deleteObj
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:155
Method
dfs
src/main/cpp/algorithms/graphtheory/TarjanSccSolverAdjacencyList.h:98
Method
dfs
Helper method that performs a depth first search on the graph to give us the topological ordering we want. Instead of maintaining a stack of the nodes
src/main/cpp/algorithms/graphtheory/TopologicalSortAdjacencyList.h:104
Function
dfs_test
Example usage of DFS
src/main/cpp/algorithms/graphtheory/DepthFirstSearchAdjacencyListIterative.h:128
Method
dijkstra
Run Dijkstra's algorithm on a directed graph to find the shortest path from a starting node to an ending node. If there is no path between the startin
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyList.h:188
Method
dijkstra
Run Dijkstra's algorithm on a directed graph to find the shortest path from a starting node to an ending node. If there is no path between the startin
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:281
Method
discreteTernarySearch
src/main/cpp/algorithms/search/TernarySearchDiscrete.h:44
Method
end
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:330
Function
extract_keys
src/test/cpp/algorithms/datastructures/hashtable/HashTableLinearProbingTest.cpp:58
Method
findMax
Helper method to find the rightmost node (which has the largest value)
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:200
Method
findMax
Helper method to find the rightmost node (which has the largest value)
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:529
Method
findMin
Helper method to find the leftmost node (which has the smallest value)
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:523
Method
formatPath
src/main/cpp/algorithms/graphtheory/Graph.h:159
Method
gcd
Finds the greatest common denominator of a and b.
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:225
Method
gcd
src/main/cpp/algorithms/math/PrimeFactorization.h:99
Method
gcd
Finds the greatest common divisor of a and b
src/main/cpp/algorithms/math/LCM.h:38
Method
gcd
Computes the Greatest Common Divisor (GCD) of a & b This method ensures that the value returned is non negative
src/main/cpp/algorithms/math/GCD.h:39
Method
genRandInt
src/main/cpp/algorithms/sorting/QuickSort3.h:48
Method
genRandInt
src/main/cpp/algorithms/math/PrimeFactorization.h:68
Function
genRandList
src/test/cpp/algorithms/datastructures/stack/StackTest.cpp:36
Function
genRandList
src/test/cpp/algorithms/datastructures/linkedlist/LinkedListTest.cpp:29
Method
generateRandomDouble
src/test/cpp/algorithms/graphtheory/FloydWarshallSolverTest.cpp:45
Method
generateRandomInt
src/test/cpp/algorithms/graphtheory/FloydWarshallSolverTest.cpp:32
Method
getBitPosition
Gets the zero base index position of the 1 bit in 'k'
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:229
Method
getCapacity
Returns the capacity of the hashtable (used mostly for testing)
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:135
Method
getFirst
src/test/cpp/algorithms/dp/MinimumWeightPerfectMatchingTest.cpp:97
Method
heapsort
src/main/cpp/algorithms/sorting/Heapsort.h:41
Method
height
Computes the height of the tree, O(n)
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:245
Method
highestOneBit
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:218
Method
increase
Strictly increases the value associated with 'ki' to 'value'
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:187
Method
increaseCapacity
Increases the capacity of the hash table.
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:118
Method
insert
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:233
Method
isEmpty
Check if this binary tree is empty
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:53
Method
isEmpty
(self)
src/main/python/algorithms/datastructures/queue/Queue.py:33
Method
isEmpty
Returns true/false depending on whether the hash-table is empty
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:140
Method
isEmpty
Check if the stack is empty
src/main/cpp/algorithms/datastructures/stack/ListStack.h:109
Method
isEmpty
src/main/cpp/algorithms/datastructures/stack/ArrayStack.h:62
Method
isEmpty
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:94
Method
isEmpty
Returns whether or not the queue is empty
src/main/cpp/algorithms/datastructures/queue/LinkedQueue.h:107
Method
isEmpty
Is this linked list empty?
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:158
Method
isFull
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:98
Method
isNotEmptyOrThrow
Helper functions to make the code more readable.
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:242
Method
isPowerOfTwo
Verifies if a number n is a power of two
src/main/python/algorithms/other/BitManipulations.py:52
Method
isPrime
src/main/cpp/algorithms/math/PrimeFactorization.h:104
Method
isPrime
src/main/cpp/algorithms/math/IsPrime.h:35
Method
isSet
Checks if the i'th is set
src/main/python/algorithms/other/BitManipulations.py:24
Method
isSet
Checks if the i'th is set
src/main/cpp/algorithms/other/BitManipulations.h:44
Method
josephus
Suppose there are n people in a circle and person 0 kill the k'th person, then the k'th person kills the 2k'th person and so on until only one person
src/main/cpp/algorithms/dp/JosephusProblem.h:40
Method
keyExistsAndValueNotNullOrThrow
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:246
Method
keyExistsOrThrow
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:251
Method
keyInBoundsOrThrow
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:259
Method
knapsack
* @param capacity - The maximum capacity of the knapsack * @param W - The weights of the items * @param V - The values of the items * @return
src/main/cpp/algorithms/dp/Knapsack_01.h:48
Method
lcm
Finds the least common multiple of a and b
src/main/cpp/algorithms/math/LCM.h:44
Method
lcs
Returns a non unique Longest Common Substring between the strings str1 and str2 in O(nm)
src/main/cpp/algorithms/dp/LongestCommonSubstring.h:41
Method
less
Tests if the value of node i < node j
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:228
Method
lis
Finds the length of the longest increasing subsequence length, O(n^2)
src/main/cpp/algorithms/dp/LongestIncreasingSubsequence.h:40
Method
lowestOneBit
The lowestOneBit returns an int value with at most a single one-bit, in the position of the lowest-order one-bit in the specified int value.
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:213
Method
lps
Returns the length of the longest paldindrome subsequence
src/main/cpp/algorithms/dp/LongestPalindromeSubsequence.h:37
Method
maximumSubarrayValue
Return the value of the maximum subarray in 'ar'
src/main/cpp/algorithms/dp/MaximumSubarray.h:38
Method
minChild
From the parent node at index i find the minimum child below it
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:213
Method
next
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:45
Method
next
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:59
Method
next
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:83
Method
next
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:117
Method
next
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:135
Method
nextPermutation
Generates the next ordered permutation in-place (skips repeated permutations). Calling this when the array is already at the highest permutation retur
src/test/cpp/algorithms/dp/MinimumWeightPerfectMatchingTest.cpp:85
Method
nodeComparison
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyList.h:160
Method
normalizeIndex
Converts a hash value to an index. Essentially, this strips the negative sign and places the hash value in the domain [0, capacity)
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:218
Method
notIn
src/main/cpp/algorithms/graphtheory/TspDynamicProgrammingIterative.h:169
Method
offer
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:61
Method
offer
Add an element to the back of the queue
src/main/cpp/algorithms/datastructures/queue/LinkedQueue.h:128
Method
operator ==
overloaded == operator
src/main/cpp/algorithms/graphtheory/treealgorithms/RootingTree.h:89
Method
operator!=
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:457
Method
operator!=
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:255
← previous
next →
401–500 of 688, ranked by callers