-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (61 loc) · 2.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Sorting Algorithms Comparison</title>
</head>
<body>
<!-- Sorting Algorithms Comparison -->
<h1>Sorting algorithms Comparison</h1>
<div id="sort-settings-wrap" class="sort-settings-wrap">
<div style="display: flex;">
<!-- Schieberegler -->
<div class="slidecontainer" style="margin-left: 0px">
<p style="margin-bottom:5px"><strong>Delay</strong></p>
<input type="range" min="1" max="250" value="100" step="1" class="slider" id="speed">
</div>
<div class="slidecontainer">
<p style="margin-bottom:5px"><strong>Array Length</strong></p>
<div style="display: flex;">
<input type="range" min="20" max="270" value="20" step="50" class="slider" id="lenght"
onchange="changelenght1()">
<input class="text-input" id="lenght-input" value="50" onchange="changelenght2()">
</div>
</div>
<!-- Auswahl -->
<div class="slidecontainer" style=" margin-right: 0;margin-left: auto;">
<p style="margin-bottom:5px"><strong>Algorithm</strong></p>
<select style="color: #5E4AE3;" id="al_choice">
<option value="bubble_sort">Bubble Sort</option>
<option value="insertion_sort">Insertion Sort</option>
<option value="quick_sort">Quick Sort</option>
<option value="merge_sort">Merge Sort</option>
<option value="selection_sort">Selection Sort</option>
</select>
</div>
</div>
<!-- Buttons -->
<div class="slidecontainer" style="display: flex;margin:0px;">
<!-- Shuffle -->
<button style="align-self: flex-end; color: #5E4AE3;" id="shuffle_button" onclick="shuffle()">Shuffle
Array</button>
<!-- Start Sorting -->
<button style="align-self: flex-end; margin-left: auto; color: #5E4AE3;" id="algorithm_button"
onclick="algorithm()">Start</button>
</div>
</div>
</div>
<!-- Sorting visualization -->
<div id="sort-container-wrap" class="sort-container-wrap">
<div class="sort-container" id="sort-container">
</div>
<!-- Operations Display -->
<div class="slidecontainer" style=" margin-right: 0;margin-left: auto; text-align: left;">
<h2>Operations on Array: <strong id="operations">0</strong></h2>
</div>
<!-- Script -->
<script src="sortingalgorithms.js"></script>
</body>
</html>