-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
95 lines (90 loc) · 4.07 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sorting Visualizer</title>
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap">
<link rel="stylesheet" href="css/style.css">
<script defer src="javascript/sorting.js"></script>
<script defer src="javascript/algorithms/bubble.js"></script>
<script defer src="javascript/algorithms/insertion.js"></script>
<script defer src="javascript/algorithms/merge.js"></script>
<script defer src="javascript/algorithms/quick.js"></script>
<script defer src="javascript/algorithms/selection.js"></script>
</head>
<body>
<header>
<h1>Sorting Visualizer</h1>
<section>
<div class="arr-options" id="newArray">
<button type="button" class="newArray">New Array</button>
<button type="button" class="reload">Reload</button>
</div>
<div class="sliders" id="input">
<span id="size">
<label for="arr_sz">Array Size</label>
<input class="arr-size" id="arr_sz" type="range" min="5" max="300" step=1 value=150>
</span>
<span id="speed">
<label for="speed_input">Animation Speed</label>
<input class="arr-speed" id="speed_input" type="range" min="10" max="1000" stepDown=10 value=1000>
</span>
</div>
<div class="slct-sort">
<button type="button" class="bubbleSort">Bubble Sort
<span class="tip">
Average complexity: O(n<sup>2</sup>)<br>
Best complexity: O(n)<br>
Worst complexity: O(n<sup>2</sup>)<br>
Space complexity: O(1)<br>
Stable: Yes
</span>
</button>
<button type="button" class="selectionSort">Selection Sort
<span class="tip">
Average complexity: O(n<sup>2</sup>)<br>
Best complexity: O(n<sup>2</sup>)<br>
Worst complexity: O(n<sup>2</sup>)<br>
Space complexity: O(1)<br>
Stable: No
</span>
</button>
<button type="button" class="insertionSort">Insertion Sort
<span class="tip">
Average complexity: O(n<sup>2</sup>)<br>
Best complexity: O(n)<br>
Worst complexity: O(n<sup>2</sup>)<br>
Space complexity: O(1)<br>
Stable: Yes
</span>
</button>
<button type="button" class="quickSort">Quick Sort
<span class="tip">
Average complexity: O(n*log n)<br>
Best complexity: O(n*log n )<br>
Worst complexity: O(n<sup>2</sup>)<br>
Space complexity: O(n)<br>
Stable: No
</span>
</button>
<button type="button" class="mergeSort">Merge Sort
<span class="tip">
Average complexity: O(n*log n)<br>
Best complexity: O(n*log n)<br>
Worst complexity: O(n*log n)<br>
Space complexity: O(n)<br>
Stable: Yes
</span>
</button>
</div>
</section>
</header>
<div id="bars" class="flex-container"></div>
</body>
</html>