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
↓ 4 callers
Method
validateTreeTraversal
(self, trav_order, input)
src/test/python/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.py:369
↓ 3 callers
Method
__remove__
Remove an arbitrary node from the linked list, O(1)
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:205
↓ 3 callers
Function
genRandList
src/test/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.cpp:35
↓ 3 callers
Method
genRandList
Generate a list of random numbers
src/test/python/algorithms/sorting/SortingTest.py:136
↓ 3 callers
Method
getMinWeightCostMatching
* Get the minimum weight cost matching. The matching is returned as an array where the nodes at * index 2*i and 2*i+1 form a matched pair. For exam
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:129
↓ 3 callers
Method
id
src/main/cpp/algorithms/graphtheory/treealgorithms/RootingTree.h:100
↓ 3 callers
Method
isEmpty
(self)
src/main/python/algorithms/datastructures/stack/ArrayStack.py:31
↓ 3 callers
Method
isEmpty
Returns true/false on whether the stack is empty
src/main/python/algorithms/datastructures/stack/IntStack.py:41
↓ 3 callers
Method
isEmpty
Check if this binary tree is empty
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:383
↓ 3 callers
Method
parent
src/main/cpp/algorithms/graphtheory/treealgorithms/RootingTree.h:104
↓ 3 callers
Function
randDouble
src/test/cpp/algorithms/datastructures/hashtable/HashTableLinearProbingTest.cpp:26
↓ 3 callers
Method
size
Returns the number of keys currently inside the hash-table
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:130
↓ 3 callers
Method
sort
(self, values)
src/main/python/algorithms/sorting/BucketSort.py:18
↓ 3 callers
Method
swap
(self, ar, i, j)
src/main/python/algorithms/sorting/QuickSort3.py:88
↓ 2 callers
Method
binarySearch
(self, lo, hi, target, function)
src/main/python/algorithms/search/BinarySearch.py:19
↓ 2 callers
Method
combinations
(self, set, r)
src/main/python/algorithms/other/UniqueCombinations.py:23
↓ 2 callers
Method
contains
returns true is the element exists in the tree
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:209
↓ 2 callers
Method
containsKey
Returns true/false on whether a given key exists within the hash-table.
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:157
↓ 2 callers
Method
dagShortestPath
A useful application of the topological sort is to find the shortest path between two nodes in a Directed Acyclic Graph (DAG). Given an adjacency list
src/main/cpp/algorithms/graphtheory/TopologicalSortAdjacencyList.h:144
↓ 2 callers
Method
dfs
Perform a depth first search on a graph with n nodes from a starting point to count the number of nodes in a given component.
src/main/cpp/algorithms/graphtheory/DepthFirstSearchAdjacencyListIterative.h:76
↓ 2 callers
Method
dfs
src/main/cpp/algorithms/graphtheory/BridgesAdjacencyList.h:93
↓ 2 callers
Function
genRandIntVec
src/test/cpp/algorithms/search/SearchingTest.cpp:46
↓ 2 callers
Function
genRandIntVec
src/test/cpp/algorithms/sorting/SortingTest.cpp:32
↓ 2 callers
Function
genRandList
src/test/cpp/algorithms/datastructures/hashtable/HashTableLinearProbingTest.cpp:41
↓ 2 callers
Method
genRandList
Generate a list of random numbers
src/test/python/algorithms/datastructures/linkedlist/DoublyLinkedListTest.py:311
↓ 2 callers
Function
genRandomDouble
src/test/cpp/algorithms/graphtheory/TravelingSalesmanProblemTest.cpp:28
↓ 2 callers
Function
getFirst
src/main/cpp/algorithms/graphtheory/TspBruteForce.h:60
↓ 2 callers
Function
getTourCost
src/test/cpp/algorithms/graphtheory/TravelingSalesmanProblemTest.cpp:53
↓ 2 callers
Method
getX
get (accessor) functions
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:54
↓ 2 callers
Method
getY
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:55
↓ 2 callers
Method
indexOf
Find the index of a particular value in the linked list, O(n)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:392
↓ 2 callers
Method
interpolationSearch
@param nums - an ordered list containing uniformly distributed values. @param val - the value we're looking for in 'nums'
src/main/python/algorithms/search/InterpolationSearch.py:20
↓ 2 callers
Method
isEmpty
Check if the stack is empty
src/main/python/algorithms/datastructures/stack/ListStack.py:29
↓ 2 callers
Function
nextPermutation
Generates the next ordered permutation in-place (skips repeated permutations). Calling this when the array is already at the highest permutation retur
src/main/cpp/algorithms/graphtheory/TspBruteForce.h:77
↓ 2 callers
Method
removeFirst
Remove the first value at the head of the linked list, O(1)
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:153
↓ 2 callers
Method
removeLast
Remove the last value at the tail of the linked list, O(1)
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:179
↓ 2 callers
Method
sink
(self, ar, n, i)
src/main/python/algorithms/sorting/Heapsort.py:39
↓ 2 callers
Method
sort
(self, values)
src/main/python/algorithms/sorting/Heapsort.py:18
↓ 2 callers
Method
swap
(self, ar, i, j)
src/main/python/algorithms/sorting/QuickSort.py:65
↓ 2 callers
Method
swap
(self, ar, i, j)
src/main/python/algorithms/sorting/Heapsort.py:61
↓ 2 callers
Method
swap
(self, sequence, i, j)
src/main/python/algorithms/other/Permutations.py:107
↓ 2 callers
Method
toString
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:423
↓ 2 callers
Method
toString
src/main/cpp/algorithms/graphtheory/treealgorithms/RootingTree.h:149
↓ 2 callers
Method
topologicalSort
Finds a topological ordering of the nodes in a Directed Acyclic Graph (DAG) The input to this function is an adjacency list for a graph and the number
src/main/cpp/algorithms/graphtheory/TopologicalSortAdjacencyList.h:127
↓ 2 callers
Function
validateTreeTraversal
src/test/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.cpp:487
↓ 1 callers
Method
Data
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:301
↓ 1 callers
Function
UniqueCombunations_test
Example usage of Unique Combunations
src/main/cpp/algorithms/other/UniqueCombinations.h:85
↓ 1 callers
Method
__add
(self, node, elem)
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:85
↓ 1 callers
Method
__combinations
(self, at, r, used, set)
src/main/python/algorithms/other/UniqueCombinations.py:36
↓ 1 callers
Method
__contains
private recursive method to find an element in the tree
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:216
↓ 1 callers
Method
__height
Recursive helper method to compute the height of the tree
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:252
↓ 1 callers
Method
__remove
(self, node, elem)
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:115
↓ 1 callers
Method
addChildren
src/main/cpp/algorithms/graphtheory/treealgorithms/RootingTree.h:96
↓ 1 callers
Method
addFirst
Add an element to the beginning of this linked list, O(1)
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:96
↓ 1 callers
Function
addTestTreeNode
src/test/python/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.py:25
↓ 1 callers
Function
benchMarkTest
BenchMark IntStack vs Python deque.
src/main/python/algorithms/datastructures/stack/IntStack.py:72
↓ 1 callers
Function
benchMarkTest
BenchMark IntQueue vs ArrayDeque.
src/main/python/algorithms/datastructures/queue/IntQueue.py:87
↓ 1 callers
Method
bucketSort
Performs a bucket sort of an array in which all the elements are bounded in the range [minValue, maxValue]. For bucket sort to give linear
src/main/python/algorithms/sorting/BucketSort.py:30
↓ 1 callers
Method
calculateNumberOfDigits
(self, number)
src/main/python/algorithms/sorting/RadixSort.py:40
↓ 1 callers
Method
clear
Empty this linked list, O(n)
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:45
↓ 1 callers
Method
clear
Clear the stack
src/main/cpp/algorithms/datastructures/stack/ListStack.h:104
↓ 1 callers
Method
clear
Clear the stack
src/main/cpp/algorithms/datastructures/stack/ArrayStack.h:51
↓ 1 callers
Method
clear
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:56
↓ 1 callers
Method
clear
src/main/cpp/algorithms/datastructures/queue/LinkedQueue.h:97
↓ 1 callers
Method
clear
Empty this linked list, O(n)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:136
↓ 1 callers
Method
combinations
To find all the combinations of size r we need to recurse until we have selected r elements (aka r = 0), otherwise if r != 0 then we need to
src/main/python/algorithms/other/Combinations.py:35
↓ 1 callers
Method
combinationsChooseR
This method finds all the combinations of size r in a set
src/main/python/algorithms/other/Combinations.py:21
↓ 1 callers
Method
combinationsWithRepetition
* Computes all combinations of elements of 'r' elements which can be repeated at most 'k' times * each. * * @param sequence - The sequenc
src/main/python/algorithms/other/CombinationsWithRepetition.py:22
↓ 1 callers
Method
contains
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:114
↓ 1 callers
Method
countSort
(self, numbers, placeValue)
src/main/python/algorithms/sorting/RadixSort.py:62
↓ 1 callers
Method
countingSort
Sorts values in the range of [minVal, maxVal] in O(n+maxVal-maxVal)
src/main/python/algorithms/sorting/CountingSort.py:30
↓ 1 callers
Method
decrease
Strictly decreases the value associated with 'ki' to 'value'
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:178
↓ 1 callers
Method
discreteTernarySearch
(self, lo, hi)
src/main/python/algorithms/search/TernarySearchDiscrete.py:38
↓ 1 callers
Method
distance
Returns the distance from point (0,0). Can be the magnitude of a vector or length of a line.
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:59
↓ 1 callers
Method
edgeCount
Get number of edges
src/main/cpp/algorithms/graphtheory/Graph.h:126
↓ 1 callers
Method
fillRandom
(self, ar)
src/test/python/algorithms/other/SlidingWindowMaximumTest.py:61
↓ 1 callers
Method
findMin
Helper method to find the leftmost node (which has the smallest value)
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:191
↓ 1 callers
Method
genUniqueRandList
Generate a list of unique random numbers
src/test/python/algorithms/datastructures/linkedlist/DoublyLinkedListTest.py:325
↓ 1 callers
Method
generatePermutations
Generates all the permutations of a sequence of objects
src/main/python/algorithms/other/Permutations.py:24
↓ 1 callers
Function
generateRandomGraph
src/test/cpp/algorithms/graphtheory/BreadthFirstSearchAdjacencyListIterativeTest.cpp:38
↓ 1 callers
Method
getFirst
(self, sequence)
src/main/python/algorithms/other/Permutations.py:100
↓ 1 callers
Method
getMax
(self, array)
src/main/python/algorithms/sorting/RadixSort.py:31
↓ 1 callers
Method
getMinWeightCost
src/main/cpp/algorithms/dp/MinimumWeightPerfectMatching.h:107
↓ 1 callers
Method
hasKey
Returns true/false on whether a given key exists within the hash-table
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:291
↓ 1 callers
Method
heapsort
(self, ar)
src/main/python/algorithms/sorting/Heapsort.py:22
↓ 1 callers
Method
inOrder
src/test/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.cpp:100
↓ 1 callers
Function
inOrderTestTreeNode
src/test/python/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.py:56
↓ 1 callers
Method
inOrderTraversal
Returns as iterator to traverse the tree in order
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:337
↓ 1 callers
Method
indexOf
Find the index of a particular value in the linked list, O(n)
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:292
↓ 1 callers
Method
insertionSort
Sort the given array using insertion sort. The idea behind insertion sort is that at the array is already sorted from [0, i] and you want
src/main/python/algorithms/sorting/InsertionSort.py:22
↓ 1 callers
Method
isEmpty
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:110
↓ 1 callers
Method
isFull
(self)
src/main/python/algorithms/datastructures/queue/IntQueue.py:55
↓ 1 callers
Method
isFull
(self)
src/main/python/algorithms/datastructures/queue/ArrayQueue.py:57
↓ 1 callers
Method
levelOrder
src/test/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.cpp:125
↓ 1 callers
Function
levelOrderTestTreeNode
src/test/python/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.py:88
↓ 1 callers
Method
levelOrderTraversal
Returns as iterator to traverse the tree in level order
src/main/python/algorithms/datastructures/binarysearchtree/BinarySearchTree.py:395
↓ 1 callers
Method
merge
Merge two sorted arrays into a larger sorted array
src/main/python/algorithms/sorting/MergeSort.py:42
↓ 1 callers
Method
mergesort
Base case is when a single element (which is already sorted)
src/main/python/algorithms/sorting/MergeSort.py:26
↓ 1 callers
Method
nextCombination
Use this method in combination with a do while loop to generate all the combinations of a set choosing r elements in a iterative fashion. Thi
src/main/python/algorithms/other/Combinations.py:70
↓ 1 callers
Method
nextPermutation
Generates the next ordered permutation in-place (skips repeated permutations). Calling this when the array is already at the highest permutat
src/main/python/algorithms/other/Permutations.py:77
← previous
next →
101–200 of 688, ranked by callers