-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·45 lines (45 loc) · 2.21 KB
/
Copy pathindex.html
File metadata and controls
executable file
·45 lines (45 loc) · 2.21 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://unpkg.com/sanitize.css" rel="stylesheet" />
<title>Sorting Visualizer</title>
<link href="src/styles.css" rel="stylesheet" />
<!-- <link href="src/styles2.css" rel="stylesheet" /> -->
</head>
<body>
<div class = "header">
<h1 class="header2">SORTING ALGORITHMS VISUALIZER</h1>
<button class="button" id="bSort" onclick="bubbleSort()">Bubble Sort</button>
<button class="button" id="sSort" onclick="selectionSort()">Selection Sort</button>
<button class="button" id="iSort" onclick="insertionSort()">Insertion Sort</button>
<button class="button" id="cSort" onclick="combSort()">Comb Sort</button>
<button class="button" id="mSort" onclick="mergeSort_inplace(array, 0 ,array.length-1)">Merge Sort</button>
<button class="button" id="hSort" onclick="heapSort(createArrayofValues())">Heap Sort</button>
<button class="button" id="qSort" onclick="let bars = document.querySelectorAll('.bar');quickSort(0, bars.length - 1)">Quick Sort</button>
</div>
<div class = 'side'>
<div id = 'space'></div>
<div>
<input type="range" min="4" max="1000" value="40" class="myslider" id="sliderRange">
<p>Number of Bars: <span id="demo"></span></p>
</div>
<div>
<input type="range" min="0.2" max="300" value="10" step = '0.2' class="myslider" id="speedRange">
<p>Speed (ms): <span id="demo2"></span></p>
</div>
<button class="button" id="generate" onclick="createBars(parseInt(output.innerHTML))">Generate Random Bars</button>
</div>
<section id= "box-data" class="data-box"></section>
</body>
<script src="src/index.js"></script>
<script src="src/heapsort.js"></script>
<script src="src/mergesort_inplace.js"></script>
<script src="src/selectionsort.js"></script>
<script src="src/bubblesort.js"></script>
<script src="src/insertionsort.js"></script>
<script src="src/combsort.js"></script>
<script src="src/quicksort.js"></script>
</html>