Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ashish-chopra/Structures
/ functions
Functions
393 in github.com/ashish-chopra/Structures
⨍
Functions
393
◇
Types & classes
106
↓ 18 callers
Method
put
inserts a key-value pair into the tree, if not already exists. In case if Key is found, then its corresponding value is replaced. if Value is <code>nu
src/main/java/com/trees/BST.java:110
↓ 16 callers
Method
compareTo
(City arg0)
src/test/java/com/sorting/HeapSortTest.java:104
↓ 16 callers
Method
union
connects two object represented by their ids in one connected component set. @param p first object id as int. @param q second object id as int.
src/main/java/com/unions/QuickUF.java:47
↓ 15 callers
Method
V
gets the total number of vertices in the graph. @return
src/main/java/com/graphs/Graph.java:112
↓ 15 callers
Method
size
returns the current size of the tree. The size of a tree T is the number of nodes in the tree, rooted at node T. @return
src/main/java/com/trees/BST.java:162
↓ 14 callers
Method
add
adds the currently performed action code in the checkpoint list. when an action is performed, the last undo action list is discarded. @param checkpoin
src/main/java/com/applications/Checkpoint.java:44
↓ 13 callers
Method
add
append specified item to the end of this list @param item specifies the item to be added
src/main/java/com/lists/LinkedList.java:72
↓ 13 callers
Method
enqueue
inserts an item into the buffer if there is an empty location. @param data item to be inserted as <code>String</code>
src/main/java/com/applications/RingBuffer.java:49
↓ 13 callers
Method
push
inserts an item into the stack. @param item An item to be added onto the stack.
src/main/java/com/stacks/Stack.java:53
↓ 10 callers
Method
add
adds an item into the bag. @param item An item need to be added.
src/main/java/com/bags/Bag.java:57
↓ 10 callers
Method
get
retrieves the value corresponding to a given key in the symbol table. @param key @return
src/main/java/com/tables/ST.java:118
↓ 10 callers
Method
isEmpty
checks to see if deque is empty. @return <code>true</code> if no elements present, <code>false</code> otherwise.
src/main/java/com/queues/Deque.java:52
↓ 10 callers
Method
pop
removes the last item inserted in the stack. @return an item inserted recently.
src/main/java/com/stacks/Stack.java:64
↓ 10 callers
Method
size
returns the number of elements in the deque. @return the size as int.
src/main/java/com/queues/Deque.java:60
↓ 10 callers
Method
union
connects two objects given by its arguments. @param p id for the first object. @param q id for the second object.
src/main/java/com/unions/UnionFind.java:70
↓ 9 callers
Method
addLast
adds an item at the end of the deque. @param item item to be added at the end of the deque.
src/main/java/com/queues/Deque.java:108
↓ 8 callers
Method
addFirst
adds an element at the front of the queue. @param item element to be inserted, should be not null.
src/main/java/com/queues/Deque.java:72
↓ 8 callers
Method
adj
returns a list of adjacent vertices of a given vertex in the graph. @param v the vertex whose adjacency list is required. @return
src/main/java/com/graphs/Graph.java:130
↓ 8 callers
Method
compare
compares the two integers a and b @param a Integer at first position @param b Integer at second position @return <code>0</code> when a and b are equal
src/main/java/com/applications/Identicals.java:62
↓ 8 callers
Method
isEmpty
checks if the checkpoint object is empty. @return <code>true</code> if is empty, <code>false</code> otherwise.
src/main/java/com/applications/Checkpoint.java:97
↓ 8 callers
Method
put
Inserts a new data item in the symbol table, corresponding to the given <code>Key</code>. If <code>key</code> is already present, then its <code>value
src/main/java/com/tables/UnorderedST.java:62
↓ 8 callers
Method
size
gets the current size of checkpoint object. It is the sum of current operations and undo operations recorded. @return size as <code>int</code>
src/main/java/com/applications/Checkpoint.java:88
↓ 8 callers
Method
size
return the actual size of buffer filled with items. @return size of buffer as <code>int</code>.
src/main/java/com/applications/RingBuffer.java:93
↓ 8 callers
Method
transform
(int i, int j)
src/main/java/com/applications/Percolation.java:47
↓ 8 callers
Method
union
connects two given objects by their id. @param p first object id as int. @param q second object id as int.
src/main/java/com/unions/WeightedQuickUF.java:60
↓ 7 callers
Method
dequeue
removes the least recent item from buffer. @return item as <code>String</code>
src/main/java/com/applications/RingBuffer.java:62
↓ 7 callers
Method
get
gets the corresponding value for a given key. if key is not found then <code>null</code> is returned. @param key @return
src/main/java/com/trees/BST.java:85
↓ 7 callers
Method
removeFirst
removes an item from the front of the deque. @return an item at the front of the deque.
src/main/java/com/queues/Deque.java:90
↓ 6 callers
Method
degree
gets the degree of a given vertex v in the graph G. A degree is the number of edges incident from vertex v. @param vertex vertex id as zer
src/main/java/com/graphs/BasicOperations.java:30
↓ 6 callers
Method
printIdenticals
returns the identical numbers found in both the sorted array of N integers in running time of T(N) ~ N for worst case.
src/main/java/com/applications/Identicals.java:34
↓ 6 callers
Method
push
(char c)
src/main/java/com/applications/MoveToFront.java:39
↓ 6 callers
Method
sort
rearranges the array in ascending order, using the natural order. @param array the array to be sorted
src/main/java/com/sorting/Heap.java:45
↓ 5 callers
Method
maximumDepth
returns the maximum depth of an expression given as <code>String</code>. If the expression is not balanced then returns <code>-1</code>. @param expre
src/main/java/com/applications/Paranthesis.java:31
↓ 5 callers
Method
push
inserts an item in the steque in stack fashion. @param item Item to be inserted.
src/main/java/com/queues/Steque.java:70
↓ 5 callers
Method
rank
(Key key)
src/main/java/com/tables/ST.java:178
↓ 5 callers
Method
size
returns the size of the queue. @return size as Integer.
src/main/java/com/queues/RandomizedQueue.java:64
↓ 5 callers
Method
size
return the number of elements currently in the steque. @return size as integer.
src/main/java/com/queues/Steque.java:103
↓ 5 callers
Method
size
returns the current size of ST. @return
src/main/java/com/tables/ST.java:41
↓ 4 callers
Method
dequeue
removes a randomly chosen item from the queue. If queue is empty, throws NoSuchElementException. @return a randomly chosen item from queue.
src/main/java/com/queues/RandomizedQueue.java:73
↓ 4 callers
Method
enqueue
inserts an item into the queue. @param item Item to be inserted in the queue.
src/main/java/com/queues/RandomizedQueue.java:44
↓ 4 callers
Method
enqueue
inserts the given item into the queue. @param item Item to be stored.
src/main/java/com/queues/Queue.java:43
↓ 4 callers
Method
enqueue
inserts an item in the steque in queue fashion. @param item Item to be inserted.
src/main/java/com/queues/Steque.java:54
↓ 4 callers
Method
exch
(Object[] A, int i, int j)
src/main/java/com/sorting/Heap.java:126
↓ 4 callers
Method
find
checks to see if there is a connection between given two object ids. @param p first object id @param q second object id @return true if connected, fal
src/main/java/com/unions/UnionFind.java:85
↓ 4 callers
Method
find
finds if connection exists between given two objects. @param p first object as int @param q second object as int @return <code>true</code> if connecte
src/main/java/com/unions/QuickUF.java:59
↓ 4 callers
Method
get
searches the given <code>key</code> in the symbol table to retrieve the corresponding <code>value</code>. @param key @return <code>value</code> if key
src/main/java/com/tables/UnorderedST.java:95
↓ 4 callers
Method
getArrayIndex
(int indice)
src/main/java/com/sorting/Heap.java:154
↓ 4 callers
Method
hasPathTo
checks to see if there is a path between source vertex and given vertex v. @param v @return
src/main/java/com/graphs/BreadthFirstSearch.java:76
↓ 4 callers
Method
isEmpty
checks to see if queue is empty. @return <code>true</code> if empty, <code>false</code> otherwise.
src/main/java/com/queues/RandomizedQueue.java:56
↓ 4 callers
Method
isEmpty
checks to see if the tree is empty. @return <code>true</code> if tree is empty, <code>false</code> otherwise.
src/main/java/com/trees/BST.java:152
↓ 4 callers
Method
isFull
checks to see if buffer is full. @return <code>true</code> if full, <code>false</code> otherwise.
src/main/java/com/applications/RingBuffer.java:85
↓ 4 callers
Method
isInRange
(int i, int j)
src/main/java/com/applications/Percolation.java:121
↓ 4 callers
Method
isOpen
checks to see if the site at location (i, j) is opened. @param i row position in the grid @param j column position in the grid @return <code>true</cod
src/main/java/com/applications/Percolation.java:60
↓ 4 callers
Method
less
(Comparable[] A, int i, int j, Comparator c)
src/main/java/com/sorting/Heap.java:137
↓ 4 callers
Method
pop
pops a least recent item in steque. @return Item object from steque.
src/main/java/com/queues/Steque.java:83
↓ 4 callers
Method
pop
returns the top item of the stack and remove it. @return most recent item inserted in the stack.
src/main/java/com/stacks/StackOfStrings.java:64
↓ 4 callers
Method
pop
pops the most recently pushed item from the stack. @return the item from Stack as <code>String</code>.
src/main/java/com/stacks/FixedCapacityStackOfStrings.java:65
↓ 4 callers
Method
removeLast
removes an item at the end of the deque. @return item from the end.
src/main/java/com/queues/Deque.java:128
↓ 4 callers
Method
root
(int x)
src/main/java/com/unions/WeightedQuickUF.java:86
↓ 4 callers
Method
root
(int n)
src/main/java/com/unions/QuickUF.java:76
↓ 4 callers
Method
sink
(Comparable[] A, int indice, int len)
src/main/java/com/sorting/Heap.java:93
↓ 4 callers
Method
size
return the number of item in list @return the size of list as integer
src/main/java/com/lists/LinkedList.java:55
↓ 4 callers
Method
size
returns the current occuppied size of the stack. @return the size as <code>int</code>.
src/main/java/com/stacks/FixedCapacityStackOfStrings.java:75
↓ 4 callers
Method
sort
rearranges the array in ascending order, using the natural order. @param array the array to be sorted
src/main/java/com/sorting/Selection.java:54
↓ 4 callers
Method
sort
rearranges the array in ascending order, using the natural order. @param array the array to be sorted
src/main/java/com/sorting/Merge.java:47
↓ 4 callers
Method
undo
undo the last performed operation/checkpoint. @return operation code of last action.
src/main/java/com/applications/Checkpoint.java:58
↓ 3 callers
Method
ceiling
returns the ceiling of a given key in the tree. The key may/may not be present in the tree. A ceiling of a key is defined as the smallest element whic
src/main/java/com/trees/BST.java:249
↓ 3 callers
Method
contains
checks if the given key is present in the symbol table. @param key key to be searched. @return <code>true</code> if found, <code>false</code> ot
src/main/java/com/tables/UnorderedST.java:114
↓ 3 callers
Method
floor
returns the floor of a given key in the tree. A floor of a key is defined as the largest element which is smaller than or equal to the given key. @par
src/main/java/com/trees/BST.java:219
↓ 3 callers
Method
isEmpty
checks to see if queue is empty. @return <code>true</code> if queue is empty, <code>false</code> otherwise.
src/main/java/com/queues/Queue.java:70
↓ 3 callers
Method
isEmpty
checks to see if steque is empty. @return true if steque is empty, false otherwise.
src/main/java/com/queues/Steque.java:95
↓ 3 callers
Method
isEmpty
checks to see if symbol table is empty. @return
src/main/java/com/tables/ST.java:49
↓ 3 callers
Method
isEmpty
checks to see if stack is empty. @return true if stack is empty, false otherwise.
src/main/java/com/stacks/StackOfStrings.java:74
↓ 3 callers
Method
isEmpty
checks to see if the stack is empty @return <code>true</code> if empty, <code>false</code> otherwise.
src/main/java/com/stacks/FixedCapacityStackOfStrings.java:84
↓ 3 callers
Method
isEmpty
checks to see if stack is empty. @return true if stack is empty, false otherwise.
src/main/java/com/stacks/ResizingCapacityStackOfStrings.java:76
↓ 3 callers
Method
iterator
returns an iterator over the LinkedList.
src/main/java/com/lists/LinkedList.java:158
↓ 3 callers
Method
pop
removes the last item inserted in the stack. @return an item inserted recently as String.
src/main/java/com/stacks/ResizingCapacityStackOfStrings.java:56
↓ 3 callers
Method
push
pushes a new item onto the stack. @param item a item as String to be added.
src/main/java/com/stacks/StackOfStrings.java:51
↓ 3 callers
Method
push
pushes a string into the stack. @param item Item to be stored in stack as <code>String</code>.
src/main/java/com/stacks/FixedCapacityStackOfStrings.java:56
↓ 3 callers
Method
push
inserts an item into the stack. @param item A String to be added onto the stack.
src/main/java/com/stacks/ResizingCapacityStackOfStrings.java:46
↓ 3 callers
Method
size
returns the size of the stack. @return number of items currently in the stack.
src/main/java/com/stacks/StackOfStrings.java:82
↓ 3 callers
Method
size
returns the current size of the stack. @return size as <ode>int</code>.
src/main/java/com/stacks/StackWithMiddle.java:38
↓ 3 callers
Method
size
returns the number of elements in the stack. @return the size of stack as integer.
src/main/java/com/stacks/ResizingCapacityStackOfStrings.java:68
↓ 3 callers
Method
sort
rearranges the array in ascending order, using the natural order. @param array the array to be sorted
src/main/java/com/sorting/Insertion.java:49
↓ 3 callers
Method
sort
rearranges the array in ascending order, using the natural order. @param array the array to be sorted
src/main/java/com/sorting/Shell.java:33
↓ 2 callers
Method
addEdge
adds an edge v-w in the graph. @param v one vertex @param w other vertex
src/main/java/com/graphs/Graph.java:102
↓ 2 callers
Method
count
()
src/main/java/com/graphs/ConnectedComponents.java:53
↓ 2 callers
Method
deleteMin
deletes the node with minimum key from the BST.
src/main/java/com/trees/BST.java:317
↓ 2 callers
Method
exch
(Object[] a, int i, int j)
src/main/java/com/sorting/Insertion.java:96
↓ 2 callers
Method
exchange
(Object[] a, int i, int j)
src/main/java/com/sorting/Selection.java:110
↓ 2 callers
Method
get
returns the item at specified position in the list @param index specifies the position from the list in integer @return item in the list @throws Index
src/main/java/com/lists/LinkedList.java:119
↓ 2 callers
Method
hasNext
()
src/main/java/com/bags/Bag.java:95
↓ 2 callers
Method
heapify
(Comparable[] A)
src/main/java/com/sorting/Heap.java:76
↓ 2 callers
Method
index
(String key)
src/main/java/com/graphs/SymbolGraph.java:102
↓ 2 callers
Method
isEmpty
checks to see if the queue is empty. @return true if queue is empty, false otherwise.
src/main/java/com/queues/QueueOfStrings.java:72
↓ 2 callers
Method
isEmpty
()
src/main/java/com/applications/MoveToFront.java:31
↓ 2 callers
Method
isEmpty
checks to see if buffer is empty. @return <code>true</code> if empty, <code>false</code> otherwise.
src/main/java/com/applications/RingBuffer.java:76
↓ 2 callers
Method
isEmpty
checks to see if list is empty. @return <code>true<code> if list is empty, <code>false</code> otherwise.
src/main/java/com/lists/LinkedList.java:63
↓ 2 callers
Method
isEmpty
checks to see if Bag is empty. @return <code>true</code> if empty, <code>false</code> otherwise.
src/main/java/com/bags/Bag.java:48
↓ 2 callers
Method
isEmpty
checks to see if stack is empty. @return true if stack is empty, false otherwise.
src/main/java/com/stacks/Stack.java:87
next →
1–100 of 393, ranked by callers