-
Notifications
You must be signed in to change notification settings - Fork 194
Expand file tree
/
Copy pathdesc.json
More file actions
214 lines (214 loc) · 15.3 KB
/
desc.json
File metadata and controls
214 lines (214 loc) · 15.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
{
"binary_search": {
"Binary Search": "Binary Search is a search algorithm that finds the position of a target value within a sorted array. It works by comparing the target value to the middle element of the array; if they are unequal, the lower or upper half of the array is eliminated depending on the result and the search is repeated in the remaining subarray until it is successful.",
"Applications": [
"Finding values in a sorted collection",
"Traversing binary search trees"
],
"Complexity": {
"Time": "worst O(log(N)), best O(1), average O(log(N))",
"Space": "worst O(log(N)) - recursive, O(1) - iterative"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Binary_search_algorithm'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/search/BinarySearch.java'>BinarySearch</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/BinarySearchVisualizer.java'>BinarySearchVisualizer</a>"
]
},
"linear_search": {
"Linear Search": "Linear search or sequential search is a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched.",
"Applications": [
"Finding values in an unordered list"
],
"Complexity": {
"Time": "worst O(N), best O(1), average O(N)",
"Space": "worst O(1) - iterative"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Linear_search'>Wikipedia</a><br>"
]
},
"bst_search": {
"Binary Search Tree": "Binary search trees (BST), sometimes called ordered or sorted binary trees, are a particular type of containers: data structures that store \"items\" (such as numbers, names etc.) in memory. They allow fast lookup, addition and removal of items, and can be used to implement either dynamic sets of items, or lookup tables that allow finding an item by its key (e.g., finding the phone number of a person by name).",
"Applications": [
"Search applications where data is constantly entering/leaving such as map and set objects in many languages' library."
],
"Complexity": {
"Time": " Best : O(1) Average : O(logN) Worst : O(N) ",
"Space": "O(n)"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Binary_search_tree'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/tree/bst/BSTAlgorithm.java'>BSTAlgorithm</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/BSTVisualizer.java'>BSTVisualizer</a>"
]
},
"bst_insert": {
"Binary Search Tree": "Binary search trees (BST), sometimes called ordered or sorted binary trees, are a particular type of containers: data structures that store \"items\" (such as numbers, names etc.) in memory. They allow fast lookup, addition and removal of items, and can be used to implement either dynamic sets of items, or lookup tables that allow finding an item by its key (e.g., finding the phone number of a person by name).",
"Applications": [
"Search applications where data is constantly entering/leaving such as map and set objects in many languages' library."
],
"Complexity": {
"Time": " Best : O(1) Average : O(logN) Worst : O(N) ",
"Space": "O(n)"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Binary_search_tree'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/tree/bst/BSTAlgorithm.java'>BSTAlgorithm</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/BSTVisualizer.java'>BSTVisualizer</a>"
]
},
"bubble_sort": {
"Bubble Sort": "Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted.",
"Complexity": {
"Time": "worst O(n^2), best O(n), average O(n^2)",
"Space": "worst O(1) auxiliary"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Bubble_sort'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/sorting/BubbleSort.java'>BubbleSort</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/SortingVisualizer.java'>SortingVisualizer</a>"
]
},
"insertion_sort": {
"Insertion Sort": "Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort.",
"Complexity": {
"Time": "worst O(n^2), best O(n), average O(n^2)",
"Space": "worst O(1) auxiliary"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Insertion_sort'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/sorting/InsertionSort.java'>InsertionSort</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/SortingVisualizer.java'>SortingVisualizer</a>"
]
},
"selection_sort": {
"Selection Sort": "The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning",
"Complexity": {
"Time": "worst O(n^2), best O(n^2), average O(n^2)",
"Space": "worst O(1) auxiliary"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Selection_sort'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/sorting/SelectionSort.java'>SelectionSort</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/SortingVisualizer.java'>SortingVisualizer</a>"
]
},
"quicksort": {
"Quicksort": "Quicksort (sometimes called partition-exchange sort) is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order.",
"Complexity": {
"Time": "worst O(n^2), best O(nlogn), average O(nlogn)",
"Space": "worst O(logn)"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Quicksort'>Quicksort</a><br>"
]
},
"merge_sort": {
"Merge Sort": "Merge Sort is a Divide and Conquer algorithm. It divides input array in two halves, calls itself for the two halves and then merges the two sorted halves.",
"Complexity": {
"Time": "worst O(nlogn), best O(nlogn), average O(nlogn)",
"Space": "worst O(n)"
},
"linked_list": {
"Singly linked list": "A Linked List is a linear collection of data elements, called nodes, each pointing to the next node by means of a pointer. It is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of data and a reference (in other words, a link) to the next node in the sequence. ",
"Complexity": {
"Time": "<br>Search: worst O(n), average O(n)<br> Access: worst O(n), average O(n) <br> Deletion: worst O(1), average O(1) <br> Insertion : worst O(1), average O(1) <br> ",
"Space": "<br>worst O(n)"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Linked_list'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/list/LinkedList.java'>LinkedList</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/LinkedListVisualizer.java'>LinkedListVisualizer</a>"
]
},
"stack": {
"Stack": "A stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. The order in which elements come off a stack gives rise to its alternative name, LIFO (for last in, first out). Additionally, a peek operation may give access to the top without modifying the stack.",
"Complexity": {
"Time": "<br>Search: worst O(n), average O(n)<br> Access: worst O(n), average O(n) <br> Deletion: worst O(1), average O(1) <br> Insertion : worst O(1), average O(1) <br> ",
"Space": "<br>worst O(n)"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Stack_(abstract_data_type)'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/list/Stack.java'>Stack</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/StackVisualizer.java'>StackVisualizer</a>"
]
},
"bfs": {
"BFS": "Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a 'search key') and explores the neighbor nodes first, before moving to the next level neighbors.",
"Applications": [
"Copying garbage collection, Cheney's algorithm",
"Finding the shortest path between two nodes u and v, with path length measured by number of edges (an advantage over depth-first search)",
"Testing a graph for bipartiteness",
"(Reverse) Cuthill–McKee mesh numbering",
"Ford–Fulkerson method for computing the maximum flow in a flow network",
"Serialization/Deserialization of a binary tree vs serialization in sorted order, allows the tree to be re-constructed in an efficient manner.",
"Construction of the failure function of the Aho-Corasick pattern matcher."
],
"Complexity": {
"Time": "worst O(|E|)",
"Space": "worst O(|V|)"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Breadth-first_search'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/graph/GraphTraversalAlgorithm.java.java'>GraphTraversal</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/graph/Digraph.java'>DirectedGraph</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/graph/DirectedGraphVisualizer.java'>DirectedGraphVisualizer</a>"
]
},
"dfs": {
"DFS": "Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking.",
"Applications": [
"Finding connected components.",
"Topological sorting.",
"Finding 2-(edge or vertex)-connected components.",
"Finding 3-(edge or vertex)-connected components.",
"Finding the bridges of a graph.",
"Generating words in order to plot the Limit Set of a Group.",
"Finding strongly connected components.",
"Planarity testing",
"Solving puzzles with only one solution, such as mazes. (DFS can be adapted to find all solutions to a maze by only including nodes on the current path in the visited set.)",
"Maze generation may use a randomized depth-first search.",
"Finding biconnectivity in graphs."
],
"Complexity": {
"Time": "worst O(|E|)",
"Space": "worst O(|V|)"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Depth-first_search'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/graph/GraphTraversalAlgorithm.java.java'>GraphTraversal</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/graph/Digraph.java'>DirectedGraph</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/graph/DirectedGraphVisualizer.java'>DirectedGraphVisualizer</a>"
]
},
"dijkstra": {
"Dijkstra": "Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later.",
"Complexity": {
"time": "worst O(|V|^2)",
"space": "worst O(|V|)"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/graph/DijkstraAgorithm.java'>DijkstraAlgorithm</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/graph/WeightedGraph2.java'>WeightedGraph</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/graph/WeightedGraphVisualizer2.java'>WeightedGraphVisualizer</a>"
]
},
"bellman_ford": {
"Bellman-Ford": "The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. It is different from Dijkstra's Shortest Path Algorithm because it allows NEGATIVE weights unlike Dijkstra's.",
"Applications": [
"Packet Routing - A variation of BF is used in the Distance vector Routing Protocol"
],
"Complexity": {
"time": "worst O(|V| |E|)",
"space": "worst O(|V|)"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm'>Wikipedia</a><br>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/graph/BellmanFordAlgorithm.java'>BellmanFord</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/algorithm/graph/WeightedGraph.java'>WeightedGraph</a>",
"<a href='https://github.com/naman14/AlgorithmVisualizer-Android/blob/master/app/src/main/java/com/naman14/algovisualizer/visualizer/graph/WeightedGraphVisualizer.java'>WeightedGraphVisualizer</a>"
]
}
}