-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (61 loc) · 3.25 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
<!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>
<!-- bootstrap css -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<nav class="container-fluid" style="background-color:darkseagreen;">
<h1 class="text-center pt-2">Sorting Visualizer</h1>
<div class="container mt-3">
<button class="btn btn-outline-light btn-dark" id="generate_arr">Generate New Array</button>
<div class="d-flex justify-content-center sort_algos">
<button class="btn btn-outline-light btn-dark mx-2 sort_algo_btn" onclick="sortAlgoRunner('bubble')">Bubble Sort</button>
<button class="btn btn-outline-light btn-dark mx-2 sort_algo_btn" onclick="sortAlgoRunner('merge')">Merge Sort</button>
<button class="btn btn-outline-light btn-dark mx-2 sort_algo_btn" onclick="sortAlgoRunner('insertion')">Insertion Sort</button>
<button class="btn btn-outline-light btn-dark mx-2 sort_algo_btn" onclick="sortAlgoRunner('selection')">Selection Sort</button>
<button class="btn btn-outline-light btn-dark mx-2 sort_algo_btn" onclick="sortAlgoRunner('quick')">Quick Sort</button>
</div>
<div class="d-flex justify-content-evenly align-items-center mt-3 pb-3">
<div>
<label class="h5">Size :</label>
<input id="arr_size" type="range" min='5' max='20' value="10"/>
</div>
<div>
<label class="h5">Speed :</label>
<input id="algo_speed" type="range" min=1 max=5 step=1 value=3>
</div>
</div>
</div>
</nav>
<section>
<div id="arr_cont" class="p-2 mt-5">
</div>
<div class="d-flex flex-row justify-content-around mt-5">
<div id="complexity_container" class="mx-2 border border-dark p-5 border-3" style="display: none;">
<h5 id="time_complexity"></h5>
<h5 id="space_complexity"></h5>
</div>
<div id="pseudocode_container" class="mx-2 p-5 text-center border border-dark border-3" style="display: none;">
<h5>Algorithm Pseudocode</h5>
<div id="pseudocode">
</div>
</div>
</div>
</section>
</body>
<!-- bootstrap js -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
<script src="scripts/main.js"></script>
<script src="scripts/animation.js"></script>
<script src="scripts/bubble-sort.js"></script>
<script src="scripts/merge-sort.js"></script>
<script src="scripts/insertion-sort.js"></script>
<script src="scripts/selection-sort.js"></script>
<script src="scripts/quick-sort.js"></script>
</html>