MCPcopy Create free account

hub / github.com/akzare/Algorithms / functions

Functions688 in github.com/akzare/Algorithms

Methodadd
Add an element to the tail of the linked list, O(1)
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:76
Methodadd
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:148
MethodaddAt
Add an element at a specified index
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:109
MethodaddRandomEdges
src/test/cpp/algorithms/graphtheory/FloydWarshallSolverTest.cpp:56
MethodadjustCapacity
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
MethodadjustIndex
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:103
Methodbegin
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:325
Methodbfs
Perform a breadth first search on a graph a starting node 'start'.
src/main/cpp/algorithms/graphtheory/BreadthFirstSearchAdjacencyListIterative.h:110
Functionbfs_test
BFS example.
src/main/cpp/algorithms/graphtheory/BreadthFirstSearchAdjacencyListIterative.h:207
MethodbinarySearch
src/main/cpp/algorithms/search/BinarySearch.h:43
MethodbinarySearchIter
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
MethodbinarySearchRecur
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
MethodbubbleSort
src/main/cpp/algorithms/sorting/BubbleSort.h:44
MethodbucketSort
src/main/cpp/algorithms/sorting/BucketSort.h:52
MethodbuildTree
Do dfs to construct rooted tree.
src/main/cpp/algorithms/graphtheory/treealgorithms/RootingTree.h:161
MethodclearBit
Sets the i'th bit to zero
src/main/python/algorithms/other/BitManipulations.py:31
MethodcoinChange
src/main/cpp/algorithms/dp/CoinChange.h:42
MethodcoinChangeRecursive
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
MethodcoinChangeSpaceEfficient
src/main/cpp/algorithms/dp/CoinChange.h:74
Methodcombinations
src/main/cpp/algorithms/other/UniqueCombinations.h:40
Methodcombinations
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
MethodcomputeMatchingCost
src/test/cpp/algorithms/dp/MinimumWeightPerfectMatchingTest.cpp:53
Methodcontains
Check if a value is contained within the linked list
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:317
MethodcountingSort
Sorts values in the range of [minVal, maxVal] in O(n+maxVal-maxVal)
src/main/cpp/algorithms/sorting/CountingSort.h:51
MethodcreateGraph
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
MethodcreateMatrix
src/test/cpp/algorithms/graphtheory/FloydWarshallSolverTest.cpp:73
MethoddeleteObj
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:155
Methoddfs
src/main/cpp/algorithms/graphtheory/TarjanSccSolverAdjacencyList.h:98
Methoddfs
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
Functiondfs_test
Example usage of DFS
src/main/cpp/algorithms/graphtheory/DepthFirstSearchAdjacencyListIterative.h:128
Methoddijkstra
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
Methoddijkstra
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
MethoddiscreteTernarySearch
src/main/cpp/algorithms/search/TernarySearchDiscrete.h:44
Methodend
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:330
Functionextract_keys
src/test/cpp/algorithms/datastructures/hashtable/HashTableLinearProbingTest.cpp:58
MethodfindMax
Helper method to find the rightmost node (which has the largest value)
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:200
MethodfindMax
Helper method to find the rightmost node (which has the largest value)
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:529
MethodfindMin
Helper method to find the leftmost node (which has the smallest value)
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:523
MethodformatPath
src/main/cpp/algorithms/graphtheory/Graph.h:159
Methodgcd
Finds the greatest common denominator of a and b.
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:225
Methodgcd
src/main/cpp/algorithms/math/PrimeFactorization.h:99
Methodgcd
Finds the greatest common divisor of a and b
src/main/cpp/algorithms/math/LCM.h:38
Methodgcd
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
MethodgenRandInt
src/main/cpp/algorithms/sorting/QuickSort3.h:48
MethodgenRandInt
src/main/cpp/algorithms/math/PrimeFactorization.h:68
FunctiongenRandList
src/test/cpp/algorithms/datastructures/stack/StackTest.cpp:36
FunctiongenRandList
src/test/cpp/algorithms/datastructures/linkedlist/LinkedListTest.cpp:29
MethodgenerateRandomDouble
src/test/cpp/algorithms/graphtheory/FloydWarshallSolverTest.cpp:45
MethodgenerateRandomInt
src/test/cpp/algorithms/graphtheory/FloydWarshallSolverTest.cpp:32
MethodgetBitPosition
Gets the zero base index position of the 1 bit in 'k'
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:229
MethodgetCapacity
Returns the capacity of the hashtable (used mostly for testing)
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:135
MethodgetFirst
src/test/cpp/algorithms/dp/MinimumWeightPerfectMatchingTest.cpp:97
Methodheapsort
src/main/cpp/algorithms/sorting/Heapsort.h:41
Methodheight
Computes the height of the tree, O(n)
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:245
MethodhighestOneBit
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:218
Methodincrease
Strictly increases the value associated with 'ki' to 'value'
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:187
MethodincreaseCapacity
Increases the capacity of the hash table.
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:118
Methodinsert
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:233
MethodisEmpty
Check if this binary tree is empty
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:53
MethodisEmpty
(self)
src/main/python/algorithms/datastructures/queue/Queue.py:33
MethodisEmpty
Returns true/false depending on whether the hash-table is empty
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:140
MethodisEmpty
Check if the stack is empty
src/main/cpp/algorithms/datastructures/stack/ListStack.h:109
MethodisEmpty
src/main/cpp/algorithms/datastructures/stack/ArrayStack.h:62
MethodisEmpty
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:94
MethodisEmpty
Returns whether or not the queue is empty
src/main/cpp/algorithms/datastructures/queue/LinkedQueue.h:107
MethodisEmpty
Is this linked list empty?
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:158
MethodisFull
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:98
MethodisNotEmptyOrThrow
Helper functions to make the code more readable.
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:242
MethodisPowerOfTwo
Verifies if a number n is a power of two
src/main/python/algorithms/other/BitManipulations.py:52
MethodisPrime
src/main/cpp/algorithms/math/PrimeFactorization.h:104
MethodisPrime
src/main/cpp/algorithms/math/IsPrime.h:35
MethodisSet
Checks if the i'th is set
src/main/python/algorithms/other/BitManipulations.py:24
MethodisSet
Checks if the i'th is set
src/main/cpp/algorithms/other/BitManipulations.h:44
Methodjosephus
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
MethodkeyExistsAndValueNotNullOrThrow
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:246
MethodkeyExistsOrThrow
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:251
MethodkeyInBoundsOrThrow
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:259
Methodknapsack
* @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
Methodlcm
Finds the least common multiple of a and b
src/main/cpp/algorithms/math/LCM.h:44
Methodlcs
Returns a non unique Longest Common Substring between the strings str1 and str2 in O(nm)
src/main/cpp/algorithms/dp/LongestCommonSubstring.h:41
Methodless
Tests if the value of node i < node j
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:228
Methodlis
Finds the length of the longest increasing subsequence length, O(n^2)
src/main/cpp/algorithms/dp/LongestIncreasingSubsequence.h:40
MethodlowestOneBit
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
Methodlps
Returns the length of the longest paldindrome subsequence
src/main/cpp/algorithms/dp/LongestPalindromeSubsequence.h:37
MethodmaximumSubarrayValue
Return the value of the maximum subarray in 'ar'
src/main/cpp/algorithms/dp/MaximumSubarray.h:38
MethodminChild
From the parent node at index i find the minimum child below it
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:213
Methodnext
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:45
Methodnext
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:59
Methodnext
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:83
Methodnext
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:117
Methodnext
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:135
MethodnextPermutation
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
MethodnodeComparison
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyList.h:160
MethodnormalizeIndex
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
MethodnotIn
src/main/cpp/algorithms/graphtheory/TspDynamicProgrammingIterative.h:169
Methodoffer
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:61
Methodoffer
Add an element to the back of the queue
src/main/cpp/algorithms/datastructures/queue/LinkedQueue.h:128
Methodoperator ==
overloaded == operator
src/main/cpp/algorithms/graphtheory/treealgorithms/RootingTree.h:89
Methodoperator!=
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:457
Methodoperator!=
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:255
← previousnext →401–500 of 688, ranked by callers