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
↓ 174 callers
Method
size
Get size of graph
src/main/cpp/algorithms/graphtheory/Graph.h:120
↓ 135 callers
Method
addDirectedEdge
Add a directed edge from node 'u' to node 'v' with cost 'cost'. Adds a directed edge to the graph. @param from - The index of the node the directed
src/main/cpp/algorithms/graphtheory/Graph.h:139
↓ 118 callers
Method
add
src/test/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.cpp:68
↓ 77 callers
Method
addUndirectedEdge
Add an undirected edge between nodes 'u' and 'v'.
src/main/cpp/algorithms/graphtheory/Graph.h:146
↓ 71 callers
Method
end
End of LInkedList wrapped in Iterator type
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:417
↓ 60 callers
Method
begin
Root of LinkedList wrapped in Iterator type
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:411
↓ 30 callers
Method
clear
Empty this graph
src/main/cpp/algorithms/graphtheory/Graph.h:112
↓ 29 callers
Method
isEmpty
return if the stack is empty
src/main/python/algorithms/datastructures/stack/Stack.py:24
↓ 28 callers
Method
remove
Remove a particular value in the linked list, O(n)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:378
↓ 27 callers
Method
size
Return the number of elements in the stack
src/main/cpp/algorithms/datastructures/stack/ListStack.h:99
↓ 24 callers
Method
peekFirst
Check the value of the first node if it exists, O(1)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:223
↓ 23 callers
Method
peekLast
Check the value of the last node if it exists, O(1)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:230
↓ 22 callers
Method
push
Push an element on the stack
src/main/cpp/algorithms/datastructures/stack/ListStack.h:114
↓ 20 callers
Method
height
Computes the height of the tree, O(n)
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:562
↓ 19 callers
Method
add
Add an element to this binary tree. Returns true if we successfully perform an insertion
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:396
↓ 19 callers
Method
addUnweightedUndirectedEdge
Add an undirected un-weighted edge between nodes 'u' and 'v'. The edge added will have a weight of 1 since its intended to be unweighted.
src/main/cpp/algorithms/graphtheory/Graph.h:154
↓ 18 callers
Method
addFirst
Add an element to the beginning of this linked list, O(1)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:183
↓ 18 callers
Method
insert
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.h:141
↓ 17 callers
Method
offer
Add an element to the queue
src/main/python/algorithms/datastructures/queue/IntQueue.py:59
↓ 16 callers
Function
generateRandomInt
src/test/cpp/algorithms/graphtheory/BreadthFirstSearchAdjacencyListIterativeTest.cpp:30
↓ 16 callers
Method
isEmpty
Return true/false on whether the queue is empty
src/main/python/algorithms/datastructures/queue/IntQueue.py:33
↓ 16 callers
Method
peek
src/main/python/algorithms/datastructures/stack/Stack.py:48
↓ 16 callers
Method
pop
pop the element off the stack
src/main/python/algorithms/datastructures/stack/Stack.py:40
↓ 15 callers
Method
poll
Make sure you check is the queue is not empty before calling poll!
src/main/python/algorithms/datastructures/queue/IntQueue.py:72
↓ 14 callers
Method
push
push the element on the stack
src/main/python/algorithms/datastructures/stack/Stack.py:32
↓ 13 callers
Method
get
Get the value associated with the input key. NOTE: returns null if the value is null AND also returns null if the key does not exists.
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:337
↓ 13 callers
Function
swap
src/main/cpp/algorithms/graphtheory/TspBruteForce.h:65
↓ 12 callers
Method
add
Add an element to the tail of the linked list, O(1)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:164
↓ 12 callers
Method
getMax
(self)
src/main/python/algorithms/other/SlidingWindowMaximum.py:60
↓ 12 callers
Method
size
Get the number of nodes in this binary tree
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:389
↓ 10 callers
Method
add
Add `x` to the range [l, r] inclusive
src/main/python/algorithms/other/LazyRangeAdder.py:46
↓ 10 callers
Method
addAt
Add an element at a specified index
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:196
↓ 10 callers
Method
addLast
Add a node to the tail of the linked list, O(1)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:170
↓ 10 callers
Method
id
return the ID the stack implementation
src/main/cpp/algorithms/datastructures/stack/Stack.h:45
↓ 10 callers
Method
isPowerOfTwo
Verifies if a number n is a power of two
src/main/cpp/algorithms/other/BitManipulations.h:68
↓ 10 callers
Method
offer
(self, elem)
src/main/python/algorithms/datastructures/queue/Queue.py:17
↓ 10 callers
Method
removeLast
Remove the last value at the tail of the linked list, O(1)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:259
↓ 10 callers
Method
size
Return the number of elements inside the queue
src/main/python/algorithms/datastructures/queue/IntQueue.py:40
↓ 9 callers
Method
Left
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:299
↓ 9 callers
Method
Right
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:300
↓ 9 callers
Method
poll
(self)
src/main/python/algorithms/datastructures/queue/Queue.py:21
↓ 9 callers
Method
pop
Pop an element off the stack Throws an error is the stack is empty
src/main/cpp/algorithms/datastructures/stack/ListStack.h:120
↓ 9 callers
Method
push
(self, elem)
src/main/python/algorithms/datastructures/stack/ArrayStack.py:35
↓ 9 callers
Method
push
Add an element to the top of the stack
src/main/python/algorithms/datastructures/stack/IntStack.py:54
↓ 9 callers
Method
removeAt
Remove a node at a particular index, O(n)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:353
↓ 8 callers
Method
isEmpty
Is this linked list empty?
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:69
↓ 8 callers
Method
offer
Add an element to the back of the queue
src/main/python/algorithms/datastructures/queue/LinkedQueue.py:56
↓ 8 callers
Method
offer
(self, elem)
src/main/python/algorithms/datastructures/queue/ArrayQueue.py:28
↓ 8 callers
Method
poll
Poll an element from the front of the queue The method throws an error is the queue is empty
src/main/python/algorithms/datastructures/queue/LinkedQueue.py:46
↓ 8 callers
Method
poll
(self)
src/main/python/algorithms/datastructures/queue/ArrayQueue.py:37
↓ 8 callers
Function
randInt
src/test/cpp/algorithms/datastructures/hashtable/HashTableLinearProbingTest.cpp:33
↓ 7 callers
Method
advance
Advances the front of the window by one unit
src/main/python/algorithms/other/SlidingWindowMaximum.py:29
↓ 7 callers
Method
put
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:144
↓ 7 callers
Method
reconstructPath
Reconstructs the shortest path (of nodes) from 'start' to 'end' inclusive. @return An array of nodes indexes of the shortest path from 'start' to 'en
src/main/cpp/algorithms/graphtheory/DijkstrasShortestPathAdjacencyList.h:268
↓ 7 callers
Method
sccCount
Returns the number of strongly connected components in the graph.
src/main/cpp/algorithms/graphtheory/TarjanSccSolverAdjacencyList.h:152
↓ 6 callers
Method
getSccs
Get the connected components of this graph. If two indexes have the same value then they're in the same SCC.
src/main/cpp/algorithms/graphtheory/TarjanSccSolverAdjacencyList.h:160
↓ 6 callers
Method
getTourCost
Returns the minimal tour cost.
src/main/cpp/algorithms/graphtheory/TspDynamicProgrammingIterative.h:311
↓ 6 callers
Method
inorder_iter
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:354
↓ 6 callers
Method
levelorder_iter
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:356
↓ 6 callers
Method
pop
Make sure you check that the stack is not empty before calling pop!
src/main/python/algorithms/datastructures/stack/IntStack.py:62
↓ 6 callers
Method
postorder_iter
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:355
↓ 6 callers
Method
preorder_iter
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:353
↓ 6 callers
Method
removeFirst
Remove the first value at the head of the linked list, O(1)
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:237
↓ 6 callers
Method
setBit
Sets the i'th bit to 1
src/main/cpp/algorithms/other/BitManipulations.h:38
↓ 6 callers
Method
shrink
Retracks the back of the window by one unit
src/main/python/algorithms/other/SlidingWindowMaximum.py:45
↓ 6 callers
Method
sort
src/main/cpp/algorithms/sorting/Heapsort.h:35
↓ 5 callers
Function
computeTourCost
src/main/cpp/algorithms/graphtheory/TspBruteForce.h:41
↓ 5 callers
Method
contains
returns true is the element exists in the tree
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:536
↓ 5 callers
Method
contains
Check is a value is contained within the linked list
src/main/cpp/algorithms/datastructures/linkedlist/DoublyLinkedList.h:406
↓ 5 callers
Method
del
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:152
↓ 5 callers
Method
done
IMPORTANT: Make certain to call this method once all the additions have been made with add(l, r, x)
src/main/python/algorithms/other/LazyRangeAdder.py:55
↓ 5 callers
Function
genRandInt
src/test/cpp/algorithms/search/SearchingTest.cpp:32
↓ 5 callers
Method
genRandList
(self, sz)
src/test/python/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.py:363
↓ 5 callers
Method
getMinWeightCost
src/test/cpp/algorithms/dp/MinimumWeightPerfectMatchingTest.cpp:47
↓ 5 callers
Method
peek
(self)
src/main/python/algorithms/datastructures/queue/IntQueue.py:47
↓ 5 callers
Method
pop
(self)
src/main/python/algorithms/datastructures/stack/ArrayStack.py:42
↓ 5 callers
Method
reconstructShortestPath
Reconstructs the shortest path (of nodes) from 'start' to 'end' inclusive. @return An array of nodes indexes of the shortest path from 'start' to 'en
src/main/cpp/algorithms/graphtheory/FloydWarshallSolver.h:195
↓ 5 callers
Method
size
src/main/cpp/algorithms/datastructures/queue/ArrayQueue.h:89
↓ 5 callers
Method
toString
src/main/cpp/algorithms/graphtheory/Graph.h:175
↓ 4 callers
Method
addLast
Add a node to the tail of the linked list, O(1)
src/main/python/algorithms/datastructures/linkedlist/DoublyLinkedList.py:83
↓ 4 callers
Method
adjustIndex
(self, index, size)
src/main/python/algorithms/datastructures/queue/ArrayQueue.py:61
↓ 4 callers
Method
begin
Root of LinkedList wrapped in Iterator type
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:475
↓ 4 callers
Method
blockID
(self, index)
src/main/python/algorithms/other/SquareRootDecomposition.py:34
↓ 4 callers
Method
clear
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:123
↓ 4 callers
Method
clearBit
Sets the i'th bit to zero
src/main/cpp/algorithms/other/BitManipulations.h:50
↓ 4 callers
Method
end
End of LInkedList wrapped in Iterator type
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:480
↓ 4 callers
Function
genRandInt
src/test/cpp/algorithms/dp/MinimumWeightPerfectMatchingTest.cpp:111
↓ 4 callers
Function
getSortedBridges
src/test/cpp/algorithms/graphtheory/BridgesAdjacencyListTest.cpp:25
↓ 4 callers
Method
interpolationSearch
* A fast alternative to a binary search when the elements are uniformly distributed. This * algorithm runs in a time complexity of ~O(log(log(n))).
src/main/cpp/algorithms/search/InterpolationSearch.h:45
↓ 4 callers
Method
isEmpty
Returns whether or not the queue is empty
src/main/python/algorithms/datastructures/queue/LinkedQueue.py:29
↓ 4 callers
Method
isEmpty
(self)
src/main/python/algorithms/datastructures/queue/ArrayQueue.py:53
↓ 4 callers
Method
keys
Returns a list of keys found in the hash table
src/main/cpp/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.h:162
↓ 4 callers
Method
lazyRangeAdder
Initialize an instance of a LazyRangeAdder on some input values
src/main/python/algorithms/other/LazyRangeAdder.py:32
↓ 4 callers
Method
query
Get sum query from [lo, hi] in O(sqrt(n))
src/main/python/algorithms/other/SquareRootDecomposition.py:49
↓ 4 callers
Function
randInt
src/test/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTreeTest.cpp:26
↓ 4 callers
Method
randValue
Generates a random number between [min, max)
src/test/python/algorithms/other/LazyRangeAdderTest.py:96
↓ 4 callers
Function
randomFillDistMatrix
src/test/cpp/algorithms/graphtheory/TravelingSalesmanProblemTest.cpp:39
↓ 4 callers
Function
randomFillSymmetricMatrix
src/test/cpp/algorithms/dp/MinimumWeightPerfectMatchingTest.cpp:125
↓ 4 callers
Method
remove
Remove a value from this binary tree if it exists, O(n)
src/main/cpp/algorithms/datastructures/binarysearchtree/BinarySearchTree.h:433
↓ 4 callers
Function
tsp
Given an nxn complete graph represented as an adjacency matrix this method finds the best tour that visits all the nodes while minimizing the overall
src/main/cpp/algorithms/graphtheory/TspBruteForce.h:93
next →
1–100 of 688, ranked by callers