Skip to content

Commit c9d391a

Browse files
committed
add Scratch Paper
1 parent a505117 commit c9d391a

File tree

17 files changed

+111
-64
lines changed

17 files changed

+111
-64
lines changed

algorithm/category.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"etc": {
1919
"name": "Uncategorized",
2020
"list": {
21-
"dp": "Dynamic Programming"
21+
"dp": "Dynamic Programming",
22+
"scratch_paper": "Scratch Paper"
2223
}
2324
}
2425
}

algorithm/etc/dp/desc.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"def": "Dynamic programming is both a mathematical optimization method and a computer programming method. In both contexts it refers to simplifying a complicated problem by breaking it down into simpler sub-problems in a recursive manner.",
3-
"apps": [],
4-
"cpx": {
2+
"Dynamic Programming": "Dynamic programming is both a mathematical optimization method and a computer programming method. In both contexts it refers to simplifying a complicated problem by breaking it down into simpler sub-problems in a recursive manner.",
3+
"Complexity": {
54
"time": "varies",
65
"space": "varies"
76
},
8-
"refs": [
9-
"https://en.wikipedia.org/wiki/Dynamic_programming"
7+
"References": [
8+
"<a href='https://en.wikipedia.org/wiki/Dynamic_programming'>Wikipedia</a>"
109
],
1110
"files": {
1211
"fibonacci": "Fibonacci Sequence",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Scratch Paper": "Write down your own algorithm to be visualized!",
3+
"Code written in the ...": {
4+
"... top editor": "predefines data variables that will be shown in a visualizing module.",
5+
"... bottom editor": "actually implements and visualizes the algorithm."
6+
},
7+
"References": [
8+
"<a href='https://github.com/parkjs814/AlgorithmVisualizer/wiki/Tracer'>Documentation of Tracers</a>"
9+
],
10+
"Be our contributor": "If you like the visualized result of your code, you can add your code to the side menu via sending us a pull request!",
11+
"files": {
12+
"scratch_paper": "Write down your own algorithm!"
13+
}
14+
}

algorithm/etc/scratch_paper/scratch_paper/code.js

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var tracer = new Tracer();

algorithm/graph_search/bfs/desc.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"def": "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.",
3-
"apps": [
2+
"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.",
3+
"Applications": [
44
"Copying garbage collection, Cheney's algorithm",
55
"Finding the shortest path between two nodes u and v, with path length measured by number of edges (an advantage over depth-first search)",
66
"Testing a graph for bipartiteness",
@@ -9,12 +9,12 @@
99
"Serialization/Deserialization of a binary tree vs serialization in sorted order, allows the tree to be re-constructed in an efficient manner.",
1010
"Construction of the failure function of the Aho-Corasick pattern matcher."
1111
],
12-
"cpx": {
12+
"Complexity": {
1313
"time": "worst O(|E|)",
1414
"space": "worst O(|V|)"
1515
},
16-
"refs": [
17-
"https://en.wikipedia.org/wiki/Breadth-first_search"
16+
"References": [
17+
"<a href='https://en.wikipedia.org/wiki/Breadth-first_search'>Wikipedia</a>"
1818
],
1919
"files": {
2020
"tree": "Searching a tree",

algorithm/graph_search/dfs/desc.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"def": "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.",
3-
"apps": [
2+
"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.",
3+
"Applications": [
44
"Finding connected components.",
55
"Topological sorting.",
66
"Finding 2-(edge or vertex)-connected components.",
@@ -13,12 +13,12 @@
1313
"Maze generation may use a randomized depth-first search.",
1414
"Finding biconnectivity in graphs."
1515
],
16-
"cpx": {
16+
"Complexity": {
1717
"time": "worst O(|E|)",
1818
"space": "worst O(|V|)"
1919
},
20-
"refs": [
21-
"https://en.wikipedia.org/wiki/Depth-first_search"
20+
"References": [
21+
"<a href='https://en.wikipedia.org/wiki/Depth-first_search'>Wikipedia</a>"
2222
],
2323
"files": {
2424
"tree": "Searching a tree",

algorithm/sorting/bubble/desc.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"def": "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.",
3-
"apps": [],
4-
"cpx": {
2+
"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.",
3+
"Complexity": {
54
"time": "worst O(n<sup>2</sup>), best O(n), average O(n<sup>2</sup>)",
65
"space": "worst O(1) auxiliary"
76
},
8-
"refs": [
9-
"https://en.wikipedia.org/wiki/Bubble_sort"
7+
"References": [
8+
"<a href='https://en.wikipedia.org/wiki/Bubble_sort'>Wikipedia</a>"
109
],
1110
"files": {
1211
"basic": "Basic"

algorithm/sorting/insertion/desc.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"def": "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.",
3-
"apps": [],
4-
"cpx": {
2+
"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.",
3+
"Complexity": {
54
"time": "worst O(n<sup>2</sup>), best O(n), average O(n<sup>2</sup>)",
65
"space": "worst O(1) auxiliary"
76
},
8-
"refs": [
9-
"https://en.wikipedia.org/wiki/Insertion_sort"
7+
"References": [
8+
"<a href='https://en.wikipedia.org/wiki/Insertion_sort'>Wikipedia</a>"
109
],
1110
"files": {
1211
"basic": "Basic"

algorithm/sorting/quick/desc.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"def": "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. Developed by Tony Hoare in 1959, with his work published in 1961, it is still a commonly used algorithm for sorting. When implemented well, it can be about two or three times faster than its main competitors, merge sort and heapsort.",
3-
"apps": [],
4-
"cpx": {
2+
"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. Developed by Tony Hoare in 1959, with his work published in 1961, it is still a commonly used algorithm for sorting. When implemented well, it can be about two or three times faster than its main competitors, merge sort and heapsort.",
3+
"Complexity": {
54
"time": "worst O(n<sup>2</sup>), best O(n log n), average O(n log n)",
65
"space": "worst O(n) auxiliary"
76
},
8-
"refs": [
9-
"https://en.wikipedia.org/wiki/Quicksort"
7+
"References": [
8+
"<a href='https://en.wikipedia.org/wiki/Quicksort'>Wikipedia</a>"
109
],
1110
"files": {
1211
"basic": "Basic"

0 commit comments

Comments
 (0)