Skip navigation links
A B C D E F G H I K L M N P Q R S T U V W X Y 

A

addEdge(ArrayList<Graph.Edge>) - Method in class com.alexprut.algo.datastructures.Graph
 
addEdge(Graph.Edge) - Method in class com.alexprut.algo.datastructures.Graph
 
addEdge(int, int, int) - Method in class com.alexprut.algo.datastructures.Graph
 
AVLTree - Class in com.alexprut.algo.datastructures
 
AVLTree() - Constructor for class com.alexprut.algo.datastructures.AVLTree
 

B

BellmanFord - Class in com.alexprut.algo.algorithms.graph
 
BellmanFord() - Constructor for class com.alexprut.algo.algorithms.graph.BellmanFord
 
bellmanFord(ArrayList<Graph.Edge>, int, int) - Static method in class com.alexprut.algo.algorithms.graph.BellmanFord
Finds the shortest path between a source and all other nodes in the graph Time complexity: Θ(|V||E|) Space complexity: Θ(|V| + |E|) total
BinaryHeap - Class in com.alexprut.algo.datastructures
 
BinaryHeap(int[]) - Constructor for class com.alexprut.algo.datastructures.BinaryHeap
 
BinarySearch - Class in com.alexprut.algo.algorithms.search
 
BinarySearch() - Constructor for class com.alexprut.algo.algorithms.search.BinarySearch
 
binarySearch(int[], int) - Static method in class com.alexprut.algo.algorithms.search.BinarySearch
Time complexity: O(logn)
BinarySearchTree - Class in com.alexprut.algo.datastructures
 
BinarySearchTree() - Constructor for class com.alexprut.algo.datastructures.BinarySearchTree
 
BinarySearchTree.BinaryNode - Class in com.alexprut.algo.datastructures
 
blackHeight() - Method in class com.alexprut.algo.datastructures.RedBlackTree
Number of black nodes on any simple path from, but not including, a node x down to a leaf
BreadthFirstSearch - Class in com.alexprut.algo.algorithms.search
 
BreadthFirstSearch() - Constructor for class com.alexprut.algo.algorithms.search.BreadthFirstSearch
 
BTree - Class in com.alexprut.algo.datastructures
 
BTree() - Constructor for class com.alexprut.algo.datastructures.BTree
 
BubbleSort - Class in com.alexprut.algo.algorithms.sorting
 
BubbleSort() - Constructor for class com.alexprut.algo.algorithms.sorting.BubbleSort
 
bubbleSort(int[]) - Static method in class com.alexprut.algo.algorithms.sorting.BubbleSort
Time complexity: O(n^2) in the worst case, O(n) in the best case, when the array is sorted Space complexity: O(n) total with O(1) auxiliary
build() - Method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: O(n)

C

com.alexprut.algo - package com.alexprut.algo
 
com.alexprut.algo.algorithms - package com.alexprut.algo.algorithms
 
com.alexprut.algo.algorithms.graph - package com.alexprut.algo.algorithms.graph
 
com.alexprut.algo.algorithms.graph.mst - package com.alexprut.algo.algorithms.graph.mst
 
com.alexprut.algo.algorithms.math - package com.alexprut.algo.algorithms.math
 
com.alexprut.algo.algorithms.search - package com.alexprut.algo.algorithms.search
 
com.alexprut.algo.algorithms.sorting - package com.alexprut.algo.algorithms.sorting
 
com.alexprut.algo.datastructures - package com.alexprut.algo.datastructures
 
compareTo(Graph.Edge) - Method in class com.alexprut.algo.datastructures.Graph.Edge
 
contains(int) - Method in class com.alexprut.algo.datastructures.BinarySearchTree
Time complexity: O(logn) if the tree is balanced, O(n) in the worst case
contains(String) - Method in class com.alexprut.algo.datastructures.Trie
Time complexity: O(|s|)
containsWord(String) - Method in class com.alexprut.algo.datastructures.Trie
Time complexity: O(|s|)
countForest(ArrayList<ArrayList<Integer>>, int) - Method in class com.alexprut.algo.algorithms.search.DepthFirstSearch
 
CountingSort - Class in com.alexprut.algo.algorithms.sorting
Assumes that each of the n input elements is an integer in the range 0 to k, for some integer k Time complexity: Θ(n)
CountingSort() - Constructor for class com.alexprut.algo.algorithms.sorting.CountingSort
 
countingSort(int[]) - Static method in class com.alexprut.algo.algorithms.sorting.CountingSort
 

D

delete(int) - Method in class com.alexprut.algo.datastructures.RedBlackTree
Time complexity: O(logn)
DepthFirstSearch - Class in com.alexprut.algo.algorithms.search
 
DepthFirstSearch() - Constructor for class com.alexprut.algo.algorithms.search.DepthFirstSearch
 
dequeue() - Method in class com.alexprut.algo.datastructures.Queue
Time complexity: Θ(1)
Dijkstra - Class in com.alexprut.algo.algorithms.graph
 
Dijkstra() - Constructor for class com.alexprut.algo.algorithms.graph.Dijkstra
 
dijkstra(ArrayList<ArrayList<Pair<Integer, Integer>>>, int, int) - Static method in class com.alexprut.algo.algorithms.graph.Dijkstra
Dijkstra’s algorithm solves the single-source shortest-paths problem on a weighted, directed graph for the case in which all edge weights are nonnegative Time complexity: O(|E| + |V|log|V|) Space complexity: TODO
DisjointSet<T> - Class in com.alexprut.algo.datastructures
 
DisjointSet() - Constructor for class com.alexprut.algo.datastructures.DisjointSet
 
DoubleLinkedList<T> - Class in com.alexprut.algo.datastructures
 
DoubleLinkedList() - Constructor for class com.alexprut.algo.datastructures.DoubleLinkedList
 
DoubleLinkedList.Node<T> - Class in com.alexprut.algo.datastructures
 

E

Edge(Graph.Node, Graph.Node, int) - Constructor for class com.alexprut.algo.datastructures.Graph.Edge
 
Edge(Graph.Node, Graph.Node) - Constructor for class com.alexprut.algo.datastructures.Graph.Edge
 
elements - Variable in class com.alexprut.algo.datastructures.BinaryHeap
 
elements() - Method in class com.alexprut.algo.datastructures.BinaryHeap
 
empty() - Method in class com.alexprut.algo.datastructures.DoubleLinkedList
Time complexity: Θ(1)
empty() - Method in class com.alexprut.algo.datastructures.LinkedList
Time complexity: Θ(1)
empty() - Method in class com.alexprut.algo.datastructures.Queue
Time complexity: Θ(1)
empty() - Method in class com.alexprut.algo.datastructures.Stack
Time complexity: Θ(1)
enqueue(T) - Method in class com.alexprut.algo.datastructures.Queue
Time complexity: Θ(1)
equals(BinarySearchTree.BinaryNode) - Method in class com.alexprut.algo.datastructures.BinarySearchTree.BinaryNode
 
equals(Graph.Edge) - Method in class com.alexprut.algo.datastructures.Graph.Edge
 
equals(Graph.Node) - Method in class com.alexprut.algo.datastructures.Graph.Node
 
equals(RedBlackTree.Node) - Method in class com.alexprut.algo.datastructures.RedBlackTree.Node
 
extract() - Method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: O(logn)
extractMax() - Method in class com.alexprut.algo.datastructures.MaxHeap
Time complexity: O(logn)
extractMin() - Method in class com.alexprut.algo.datastructures.MinHeap
Time complexity: O(logn)

F

factorial(int) - Static method in class com.alexprut.algo.algorithms.math.Math
 
FibonacciHeap - Class in com.alexprut.algo.datastructures
 
FibonacciHeap() - Constructor for class com.alexprut.algo.datastructures.FibonacciHeap
 
findSet(DisjointSet<T>.Element<T>) - Method in class com.alexprut.algo.datastructures.DisjointSet
 
findSet(T) - Method in class com.alexprut.algo.datastructures.DisjointSet
 
first() - Method in class com.alexprut.algo.datastructures.Pair
 
FloydWarshall - Class in com.alexprut.algo.algorithms.graph
 
FloydWarshall() - Constructor for class com.alexprut.algo.algorithms.graph.FloydWarshall
 
floydWarshall(int[][]) - Static method in class com.alexprut.algo.algorithms.graph.FloydWarshall
Find the shortest path between any pair of nodes Time complexity: Θ(V^3) Space complexity: Θ(V^2)

G

gcd(int, int) - Static method in class com.alexprut.algo.algorithms.math.Math
Greatest common divisor, Euclide algorithms Time complexity: O(b) given gcd(a, b)
getAdjacencyList() - Method in class com.alexprut.algo.datastructures.Graph
 
getAdjacencyMatrix() - Method in class com.alexprut.algo.datastructures.Graph
 
getEdges() - Method in class com.alexprut.algo.datastructures.Graph
 
getElement(T) - Method in class com.alexprut.algo.datastructures.DisjointSet
 
getNext() - Method in class com.alexprut.algo.datastructures.DoubleLinkedList.Node
 
getNext() - Method in class com.alexprut.algo.datastructures.LinkedList.Node
Time complexity: Θ(1)
getPrev() - Method in class com.alexprut.algo.datastructures.DoubleLinkedList.Node
 
getValue() - Method in class com.alexprut.algo.datastructures.DoubleLinkedList.Node
 
getValue() - Method in class com.alexprut.algo.datastructures.LinkedList.Node
Time complexity: Θ(1)
Graph - Class in com.alexprut.algo.datastructures
Conventions: the nodes are labeled from 0 to n (exclusive)
Graph(int) - Constructor for class com.alexprut.algo.datastructures.Graph
 
Graph(int, boolean) - Constructor for class com.alexprut.algo.datastructures.Graph
 
Graph.Edge - Class in com.alexprut.algo.datastructures
 
Graph.Node - Class in com.alexprut.algo.datastructures
 

H

hasCycle(ArrayList<ArrayList<Integer>>, int) - Method in class com.alexprut.algo.algorithms.search.DepthFirstSearch
 
head() - Method in class com.alexprut.algo.datastructures.DoubleLinkedList
 
head() - Method in class com.alexprut.algo.datastructures.LinkedList
 
heapify(int) - Method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: O(logn)
heapify(int) - Method in class com.alexprut.algo.datastructures.MaxHeap
Time complexity: O(logn)
heapify(int) - Method in class com.alexprut.algo.datastructures.MinHeap
Time complexity: O(logn)
heapsort() - Method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: O(nlogn) Space complexity: algorithms is in-place
heapsort() - Method in class com.alexprut.algo.datastructures.MinHeap
Time complexity: O(nlogn) Space complexity: algorithms is in-place

I

increaseKey(int, int) - Method in class com.alexprut.algo.datastructures.MaxHeap
Time complexity: O(logn)
insert(int) - Method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: O(logn)
insert(int) - Method in class com.alexprut.algo.datastructures.BinarySearchTree
Time complexity: O(logn) if the tree is balanced, O(n) in the worst case
insert(int) - Method in class com.alexprut.algo.datastructures.MaxHeap
Time complexity: O(logn)
insert(int) - Method in class com.alexprut.algo.datastructures.MinHeap
Time complexity: O(logn)
insert(int) - Method in class com.alexprut.algo.datastructures.RedBlackTree
Time complexity: O(logn)
insert(T) - Method in class com.alexprut.algo.datastructures.Stack
Time complexity: Θ(1)
insert(String) - Method in class com.alexprut.algo.datastructures.Trie
Time complexity: O(|s|)
insertBack(T) - Method in class com.alexprut.algo.datastructures.DoubleLinkedList
Time complexity: Θ(1)
insertFixup(RedBlackTree.Node) - Method in class com.alexprut.algo.datastructures.RedBlackTree
Time complexity: O(logn)
insertFront(T) - Method in class com.alexprut.algo.datastructures.DoubleLinkedList
Time complexity: Θ(1)
insertFront(T) - Method in class com.alexprut.algo.datastructures.LinkedList
Time complexity: Θ(1)
InsertionSort - Class in com.alexprut.algo.algorithms.sorting
 
InsertionSort() - Constructor for class com.alexprut.algo.algorithms.sorting.InsertionSort
 
insertionSort(int[]) - Static method in class com.alexprut.algo.algorithms.sorting.InsertionSort
Time complexity: O(n^2) in the worst case, when the array is sorted in reverse order O(n) best case, when the array is already sorted Space complexity; O(n) total with O(1) auxiliary In-place algorithm, it rearranges the numbers within the given array, with at most a constant number of them stored outside the array at any time
isDAG(ArrayList<ArrayList<Integer>>) - Method in class com.alexprut.algo.algorithms.search.DepthFirstSearch
 
isPalindrome(String) - Static method in class com.alexprut.algo.Utils
Time complexity: O(n) Space complexity: O(n) total and O(1) auxiliary
isPrime(int) - Static method in class com.alexprut.algo.algorithms.math.Math
 
isRed() - Method in class com.alexprut.algo.datastructures.RedBlackTree.Node
 

K

KnuthMorrisPratt - Class in com.alexprut.algo.algorithms
 
KnuthMorrisPratt() - Constructor for class com.alexprut.algo.algorithms.KnuthMorrisPratt
 
Kruskal - Class in com.alexprut.algo.algorithms.graph.mst
 
Kruskal() - Constructor for class com.alexprut.algo.algorithms.graph.mst.Kruskal
 
kruskal(ArrayList<Graph.Edge>, int) - Static method in class com.alexprut.algo.algorithms.graph.mst.Kruskal
Finds the minimum spanning tree (MST) of an undirected graph Time complexity: O(|E|log|V|) Space complexity: TODO

L

left(int) - Static method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: Θ(1)
left() - Method in class com.alexprut.algo.datastructures.BinarySearchTree.BinaryNode
 
left() - Method in class com.alexprut.algo.datastructures.RedBlackTree.Node
 
LinkedList<T> - Class in com.alexprut.algo.datastructures
 
LinkedList() - Constructor for class com.alexprut.algo.datastructures.LinkedList
 
LinkedList.Node<T> - Class in com.alexprut.algo.datastructures
 

M

makeSet(T) - Method in class com.alexprut.algo.datastructures.DisjointSet
 
Math - Class in com.alexprut.algo.algorithms.math
 
Math() - Constructor for class com.alexprut.algo.algorithms.math.Math
 
max() - Method in class com.alexprut.algo.datastructures.MaxHeap
Time complexity: Θ(1)
max(int[]) - Static method in class com.alexprut.algo.Utils
Time complexity: O(n) Space complexity: O(n) total and O(1) auxiliary
MaxHeap - Class in com.alexprut.algo.datastructures
 
MaxHeap() - Constructor for class com.alexprut.algo.datastructures.MaxHeap
 
MaxHeap(int[]) - Constructor for class com.alexprut.algo.datastructures.MaxHeap
 
maximum() - Method in class com.alexprut.algo.datastructures.BinarySearchTree
Time complexity: O(logn) if the tree is balanced, O(n) in the worst case
MaximumSubarray - Class in com.alexprut.algo.algorithms
J.Kadane algorithm (i.e.
MaximumSubarray() - Constructor for class com.alexprut.algo.algorithms.MaximumSubarray
 
maximumSubarray(int[]) - Static method in class com.alexprut.algo.algorithms.MaximumSubarray
Finds the contiguous sub-array within a one-dimensional array, a[1...n], of numbers which has the largest sum Time complexity: Θ(n) Space complexity: Θ(n) total with Θ(1) auxiliary
MergeSort - Class in com.alexprut.algo.algorithms.sorting
 
MergeSort() - Constructor for class com.alexprut.algo.algorithms.sorting.MergeSort
 
mergeSort(int[], int, int) - Static method in class com.alexprut.algo.algorithms.sorting.MergeSort
It is a divide-and-conquer algorithms Time complexity: Θ(nlogn) in the worst and best case Space complexity; O(n) total with O(n) auxiliary the algorithms is not in place
min() - Method in class com.alexprut.algo.datastructures.MinHeap
Time complexity: Θ(1)
min(int[]) - Static method in class com.alexprut.algo.Utils
Time complexity: O(n) Space complexity: O(n) total and O(1) auxiliary
MinHeap - Class in com.alexprut.algo.datastructures
 
MinHeap() - Constructor for class com.alexprut.algo.datastructures.MinHeap
 
MinHeap(int[]) - Constructor for class com.alexprut.algo.datastructures.MinHeap
 
minimum() - Method in class com.alexprut.algo.datastructures.BinarySearchTree
Time complexity: O(logn) if the tree is balanced, O(n) in the worst case
mst() - Method in class com.alexprut.algo.datastructures.Graph
Calculates the minimum spanning tree

N

Node(T, DoubleLinkedList.Node<T>, DoubleLinkedList.Node<T>) - Constructor for class com.alexprut.algo.datastructures.DoubleLinkedList.Node
 
Node(int) - Constructor for class com.alexprut.algo.datastructures.Graph.Node
 
Node(T, LinkedList.Node<T>) - Constructor for class com.alexprut.algo.datastructures.LinkedList.Node
 

P

Pair<F,S> - Class in com.alexprut.algo.datastructures
 
Pair(F, S) - Constructor for class com.alexprut.algo.datastructures.Pair
 
parent(int) - Static method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: Θ(1)
permute(ArrayList<T>) - Static method in class com.alexprut.algo.algorithms.math.Math
 
pop() - Method in class com.alexprut.algo.datastructures.Stack
Time complexity: Θ(1)
predecessorSubgraph(ArrayList<ArrayList<Integer>>, int) - Method in class com.alexprut.algo.algorithms.search.BreadthFirstSearch
Time complexity: O(V + E) Space complexity: O(V)
Prim - Class in com.alexprut.algo.algorithms.graph.mst
 
Prim() - Constructor for class com.alexprut.algo.algorithms.graph.mst.Prim
 
prim(ArrayList<ArrayList<Pair<Integer, Integer>>>, int, int) - Static method in class com.alexprut.algo.algorithms.graph.mst.Prim
Finds the minimum spanning tree (MST) of an undirected graph Time complexity: O(|E|log|V|) Space complexity: TODO
push(T) - Method in class com.alexprut.algo.datastructures.Stack
Time complexity: Θ(1)

Q

Queue<T> - Class in com.alexprut.algo.datastructures
FIFO
Queue() - Constructor for class com.alexprut.algo.datastructures.Queue
 
QuickSort - Class in com.alexprut.algo.algorithms.sorting
Time complexity: Worst case is O(n^2), when the array is already sorted, best case is O(nlogn)
QuickSort() - Constructor for class com.alexprut.algo.algorithms.sorting.QuickSort
 
quickSort(int[], int, int) - Static method in class com.alexprut.algo.algorithms.sorting.QuickSort
 

R

RabinKarp - Class in com.alexprut.algo.algorithms
 
RabinKarp() - Constructor for class com.alexprut.algo.algorithms.RabinKarp
 
RedBlackTree - Class in com.alexprut.algo.datastructures
A red-black tree is a binary tree that satisfies the following red-black properties: 1) Every node is either red or black 2) The root is black 3) Every leaf (NULL) is black 4) If a node is red, then both its children are black 5) For each node, all simple paths from the node to descendant leaves contain the same number of black nodes
RedBlackTree.Node - Class in com.alexprut.algo.datastructures
 
remove(BinarySearchTree.BinaryNode) - Method in class com.alexprut.algo.datastructures.BinarySearchTree
Time complexity: O(logn) if the tree is balanced, O(n) in the worst case
remove() - Method in class com.alexprut.algo.datastructures.Stack
Time complexity: Θ(1)
removeBack() - Method in class com.alexprut.algo.datastructures.DoubleLinkedList
Time complexity: Θ(1)
removeFront() - Method in class com.alexprut.algo.datastructures.DoubleLinkedList
Time complexity: Θ(1)
removeFront() - Method in class com.alexprut.algo.datastructures.LinkedList
Time complexity: Θ(1)
reverse(int[], int, int) - Static method in class com.alexprut.algo.Utils
Time complexity: O(n) Space complexity: O(n) total and O(1) auxiliary
right(int) - Static method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: Θ(1)
right() - Method in class com.alexprut.algo.datastructures.BinarySearchTree.BinaryNode
 
right() - Method in class com.alexprut.algo.datastructures.RedBlackTree.Node
 
root() - Method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: Θ(1)

S

search(int) - Method in class com.alexprut.algo.datastructures.BinarySearchTree
Time complexity: O(logn) if the tree is balanced, O(n) in the worst case
search(int) - Method in class com.alexprut.algo.datastructures.RedBlackTree
Time complexity: O(logn)
second() - Method in class com.alexprut.algo.datastructures.Pair
 
SegmentTree - Class in com.alexprut.algo.datastructures
 
SegmentTree() - Constructor for class com.alexprut.algo.datastructures.SegmentTree
 
setBlackColor() - Method in class com.alexprut.algo.datastructures.RedBlackTree.Node
 
setLeft(BinarySearchTree.BinaryNode) - Method in class com.alexprut.algo.datastructures.BinarySearchTree.BinaryNode
 
setLeft(RedBlackTree.Node) - Method in class com.alexprut.algo.datastructures.RedBlackTree.Node
 
setNext(DoubleLinkedList.Node<T>) - Method in class com.alexprut.algo.datastructures.DoubleLinkedList.Node
 
setNext(LinkedList.Node<T>) - Method in class com.alexprut.algo.datastructures.LinkedList.Node
Time complexity: Θ(1)
setPrev(DoubleLinkedList.Node<T>) - Method in class com.alexprut.algo.datastructures.DoubleLinkedList.Node
 
setRedColor() - Method in class com.alexprut.algo.datastructures.RedBlackTree.Node
 
setRight(BinarySearchTree.BinaryNode) - Method in class com.alexprut.algo.datastructures.BinarySearchTree.BinaryNode
 
setRight(RedBlackTree.Node) - Method in class com.alexprut.algo.datastructures.RedBlackTree.Node
 
shortestPath(ArrayList<ArrayList<Integer>>, int) - Method in class com.alexprut.algo.algorithms.search.BreadthFirstSearch
Time complexity: O(V + E) Space complexity: O(V)
size - Variable in class com.alexprut.algo.datastructures.BinaryHeap
 
size() - Method in class com.alexprut.algo.datastructures.BinaryHeap
Time complexity: Θ(1)
size() - Method in class com.alexprut.algo.datastructures.BinarySearchTree
Time complexity: Θ(1)
size() - Method in class com.alexprut.algo.datastructures.DoubleLinkedList
 
size() - Method in class com.alexprut.algo.datastructures.LinkedList
 
size() - Method in class com.alexprut.algo.datastructures.Queue
Time complexity: Θ(1)
size() - Method in class com.alexprut.algo.datastructures.Stack
Time complexity: Θ(1)
Stack<T> - Class in com.alexprut.algo.datastructures
LIFO
Stack() - Constructor for class com.alexprut.algo.datastructures.Stack
 
swap(int[], int, int) - Static method in class com.alexprut.algo.Utils
Time complexity: O(1) Space complexity: O(n) total and O(1) auxiliary

T

tail() - Method in class com.alexprut.algo.datastructures.DoubleLinkedList
 
topologicalSort(ArrayList<ArrayList<Integer>>) - Method in class com.alexprut.algo.algorithms.search.DepthFirstSearch
 
Trie - Class in com.alexprut.algo.datastructures
 
Trie() - Constructor for class com.alexprut.algo.datastructures.Trie
 

U

union(DisjointSet<T>.Element<T>, DisjointSet<T>.Element<T>) - Method in class com.alexprut.algo.datastructures.DisjointSet
 
Utils - Class in com.alexprut.algo
 
Utils() - Constructor for class com.alexprut.algo.Utils
 

V

value() - Method in class com.alexprut.algo.datastructures.BinarySearchTree.BinaryNode
 
value() - Method in class com.alexprut.algo.datastructures.Graph.Node
 
value() - Method in class com.alexprut.algo.datastructures.RedBlackTree.Node
 

W

w - Variable in class com.alexprut.algo.datastructures.Graph.Edge
 

X

x - Variable in class com.alexprut.algo.datastructures.Graph.Edge
 

Y

y - Variable in class com.alexprut.algo.datastructures.Graph.Edge
 
A B C D E F G H I K L M N P Q R S T U V W X Y 
Skip navigation links