-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
47 lines (41 loc) · 1.71 KB
/
Copy pathindex.html
File metadata and controls
47 lines (41 loc) · 1.71 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
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sorting Visualizer</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1> Sorting Algorithm Visualizer</h1>
<div class="slider-container">
<label for="arraySize">Array Size:</label>
<input type="range" id="arraySize" min="5" max="100" value="50">
<span id="arraySizeValue">50</span>
</div>
<div class="slider-container">
<label for="speed">Speed:</label>
<input type="range" id="speed" min="1" max="100" value="50">
<span id="speedValue">50</span>
</div>
<div class="controls">
<button class="generate-btn" onclick="generateArray()">Generate New Array</button>
<button class="sort-btn" onclick="bubbleSort()">Bubble Sort</button>
<button class="sort-btn" onclick="selectionSort()">Selection Sort</button>
<button class="sort-btn" onclick="insertionSort()">Insertion Sort</button>
</div>
<div id="status" class="status"></div>
<div id="arrayContainer" class="array-container"></div>
<div class="info">
<strong>Legend:</strong>
<span style="color: #ed8936;">● Comparing</span> |
<span style="color: #e53e3e;">● Swapping</span> |
<span style="color: #38a169;">● Sorted</span>
</div>
</div>
<script src="script.js"></script>
</script>
</body>
</html>