-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
324 lines (268 loc) · 10.4 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
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title>Sorting Visualizer</title>
<style>
body {
background: linear-gradient(to right, #1f4037, #99f2c8);
}
.container1 {
position: relative;
width: 100%;
height: 750px;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
.panel {
font-family: 'Ubuntu', monospace, Courier;
position: relative;
width: 100%;
min-height: 100vh;
display: block;
overflow: auto;
color: white;
background: linear-gradient(0deg, rgba(20, 14, 8, 0.944) 0%, rgba(22, 22, 22, 1) 70%);
word-wrap: normal;
}
.store .heading {
font-family: sans-serif;
text-align: center;
}
.store .heading #algo {
font-size: 60px;
}
.store .heading #visual {
font-size: 40px;
}
img {
width: 80px;
height: auto;
}
.footer-content img {
padding: 5px;
width: 32px;
height: 32px;
}
.sidebar {
height: 100%;
width: 0;
position: fixed;
z-index: 2;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
transition: 0.5s;
padding-top: 90px;
}
.sidebar a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}
.sidebar a:hover {
color: #f1f1f1;
}
.sidebar .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
}
.openbtn {
font-size: 20px;
cursor: pointer;
color: white;
padding: 10px 15px;
border: none;
}
.openbtn:hover {
background-color: #444;
}
#main {
transition: margin-left .5s;
padding: 16px;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/ScrambleTextPlugin.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script>
</head>
<body>
<div id="mySidebar" class="sidebar">
<h1><a href="/index.html">Home</a></h1>
<h3 class="text-light ps-3">LOGARITHMIC</h3>
<a href="/quicksort.html">Quick Sort</a>
<a href="/merge.html">Merge Sort</a>
<a href="/heap.html">Heap Sort</a>
<h3 class="text-light ps-3">QUADRATIC</h3>
<a href="/selection.html">Selection Sort</a>
<a href="/bubble.html">Bubble Sort</a>
<a href="/insertion.html">Insertion Sort</a>
<h3 class="text-light ps-3">Custom</h3>
<a href="/custom.html">Your Sort</a>
</div>
<nav class="fixed-top navbar navbar-dark bg-dark">
<div class="container-fluid">
<div class="d-flex">
<button id="togglebutton" class="openbtn bg-dark text-light" onclick="toggleNav()">☰</button>
<a class="navbar-brand float-start mx-4" href="#">Sort Visualiser</a>
</div>
</div>
</nav>
<section class="panels">
<div class="container1 " id="box">
<div class="store">
<div class="images">
<img src="images/s.png" alt="S letter">
<img src="images/o.png" alt="o letter">
<img src="images/r.png" alt="r letter">
<img src="images/t.png" alt="t letter">
<img src="images/i.png" alt="I letter">
<img src="images/n.png" alt="N letter">
<img src="images/g.png" alt="G letter">
</div>
<div class="heading text-light">
<h1 id="algo">ALGORITHMS</h1>
<h1 id="visual">VISUALISER</h1>
</div>
</div>
</div>
</section>
<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js"></script>
<section class="panel">
<div class="para p-5">
<div class="gra px-5">
<div class="head mb-4">
<h1>
Sorting Algorithms
</h1>
</div>
<div class="bod">
<h3>
Sorting algorithms are used to sort a data structure according to a specific order relationship,
such as numerical order or lexicographical order.
</h3>
<h3>
This operation is one of the most important and widespread in computer science. For a long time,
new methods have been developed to make this procedure faster and faster.
</h3>
<h3>
There are currently hundreds of different sorting algorithms, each with its own specific
characteristics. They are classified according to two metrics: space complexity and time
complexity.
</h3>
<h3>
Those two kinds of complexity are represented with asymptotic notations, mainly with the symbols
O, Θ, Ω, representing respectively the upper bound, the tight bound, and the lower bound of the
algorithm's complexity, specifying in brackets an expression in terms of n, the number of the
elements of the data structure.
</h3>
<h3>
Most of Sorting Algorithms fall into two categories:
</h3>
<h3>
<ul>
<li>Logarithmic <br>
The complexity is proportional to the binary logarithm (i.e to the base 2) of n.
<br>
An example of a logarithmic sorting algorithm is Quick sort, with space and time
complexity O(n × log n).
</li>
<li>
Quadratic <br>
The complexity is proportional to the square of n. <br>
An example of a quadratic sorting algorithm is Bubble sort, with a time complexity
of O(n2).
</li>
</ul>
</h3>
<h3>
Space and time complexity can also be further subdivided into 3 different cases: best case,
average case and worst case.
</h3>
<h3>
Sorting algorithms can be difficult to understand and it's easy to get confused. We believe
visualizing sorting algorithms can be a great way to better understand their functioning while
having fun!
</h3>
<br>
</div>
</div>
</div>
</section>
<footer class="footer bg-dark">
<div class="container">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 h-4border-top text-muted ">
<div class="float-start">© Pravocodes</div>
<div class="float-end">
<div class="d-flex footer-content">
<img src="/images/Github_icon.png" alt="">
<p>Github</p>
</div>
</div>
</footer>
</div>
</footer>
<script>
function toggleNav() {
var sidebar = document.getElementById("mySidebar");
var button = document.getElementById("togglebutton");
if (sidebar.style.width === "300px") {
sidebar.style.width = "0";
button.innerHTML = "☰";
} else {
sidebar.style.width = "300px";
button.innerHTML = "✖";
}
}
gsap.registerPlugin(ScrollTrigger);
// gsap.registerPlugin(ScrambleTextPlugin);
gsap.fromTo(".gra", { x: -1200 }, {
scrollTrigger: {
trigger: ".gra",
// pin: true,
toggleActions: "restart none none none"
},
x: 0,
duration: 2,
});
gsap.fromTo(".gra2", { x: 1200 }, {
scrollTrigger: {
trigger: ".gra2",
// pin: true,
toggleActions: "restart none none none"
},
x: 0,
duration: 2,
});
gsap.fromTo(".images img",
{ x: -1200 },
{ duration: 5, rotation: 360, x: 0, ease: "bounce", stagger: 4 }
);
// gsap.utils.toArray(".panel").forEach((panel, i) => {
// ScrollTrigger.create({
// trigger: panel,
// start: "top top",
// pin: true,
// pinSpacing: false,
// });
// });
// var tl = gsap.timeline({ defaults: { duration: 2, ease: "none" } });
// tl.to("#algo", { scrambleText: { text: "ALGORITHMS", chars: "upperCase", speed: 0.3 } })
// GSDevTools.create({ animation: tl, minimal: true });
</script>
</html>