-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselectionSort.html
More file actions
217 lines (174 loc) · 9.12 KB
/
selectionSort.html
File metadata and controls
217 lines (174 loc) · 9.12 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DSA Visualizer - Selection Sort</title>
<link rel="shortcut icon" href="images/icon1.jpeg" type="image/x-icon">
<script src="https://kit.fontawesome.com/176e14c7a2.js" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
</head>
<body onload="loadPage()">
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<a style="color: white; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-weight: 500; position: relative; top: -1px;"
class="navbar-brand" href="#">DSA Visualizer</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<i style="color: white;" class="fa-solid fa-bars"></i>
</button>
<div class="collapse navbar-collapse justify-content-start mt-2" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item a" onclick="getIndex()">
<a class="nav-link">Data Structures</a>
<div class="underline "></div>
</li>
<li class="nav-item a" onclick="getCompiler()">
<a class="nav-link">Compiler</a>
<div class="underline"></div>
</li>
<li class="nav-item a" onclick="getTopic()">
<a class="nav-link">DSA Topics</a>
<div class="underline"></div>
</li>
</ul>
</div>
<script>
function getIndex(){
window.location.href = 'https://dsabrototype.vercel.app'
}
function getCompiler(){
window.location.href = 'https://dsabrototype.vercel.app/compiler.html'
}
function getTopic(){
window.location.href = 'https://dsabrototype.vercel.app/topics.html'
}
</script>
<div class="collapse navbar-collapse justify-content-end mt-2" id="navbarNavDropdown">
<div class="dropdown">
<button style="background-color: black; color: white; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;" class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Selection Sort
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="bubbleSort.html">Bubble Sort</a></li>
<li><a class="dropdown-item" href="insertionSort.html">Insertion Sort</a></li>
<!-- <li><a class="dropdown-item" href="/">Quick Sort</a></li>
<li><a class="dropdown-item" href="/">Merge Sort</a></li> -->
</ul>
</div>
</div>
</div>
</nav>
<section id="message">
<h4 style="text-align: center;">Please make the window wider for a better user experience</h4>
</section>
<section id="content">
<h1
style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; text-align: center; font-size: 22px; background-color: rgb(229, 229, 229); padding: 12px; padding-bottom: 16px; font-weight: 500;">
Selection Sort - <span style="color: chocolate;">Visual</span> Representation</h1>
<section class="container-fluid">
<section class="row" style="display: flex; justify-content: space-around;">
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center; " class="col-12-sm col-sm-12">
<section style="display: flex; flex-direction: column; padding-top: 80px; align-items: center;">
<div id="graph_body" style="display: flex; align-items: end; height: 180px;">
<div id="graph0" class="sort_value_div">
5
</div>
<div id="graph1" class="sort_value_div">
5
</div>
<div id="graph2" class="sort_value_div">
5
</div>
<div id="graph3" class="sort_value_div">
5
</div>
<div id="graph4" class="sort_value_div">
5
</div>
<div id="graph5" class="sort_value_div">
5
</div>
<div id="graph6" class="sort_value_div">
5
</div>
<div id="graph7" class="sort_value_div">
5
</div>
<div id="graph8" class="sort_value_div">
5
</div>
<div id="graph9" class="sort_value_div">
5
</div>
</div>
<div class="array_area">
<div id="" style="display: flex; position: relative; top: 0px;" class="">
<div id="index0" class="sort_index_div">
0
</div>
<div id="index1" class="sort_index_div">
1
</div>
<div id="index2" class="sort_index_div">
2
</div>
<div id="index3" class="sort_index_div">
3
</div>
<div id="index4" class="sort_index_div">
4
</div>
<div id="index5" class="sort_index_div">
5
</div>
<div id="index6" class="sort_index_div">
6
</div>
<div id="index7" class="sort_index_div">
7
</div>
<div id="index8" class="sort_index_div">
8
</div>
<div id="index9" class="sort_index_div">
9
</div>
</div>
</section>
</div>
<section class="" style="display: flex; justify-content: center; align-items: center; padding-left: 20px;" id="form_section">
<div id="note_pad_div" style="display: block; flex-direction: column; padding-right: 30px;">
<p
style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-weight: 500; font-size: 20px; padding-left: 0px;">
Explanation</p>
<div id="note_pad"
style="width:400px; background-color: rgb(229, 229, 229); padding: 20px; padding-top: 20px;">
<p style="font-size: 16px; margin-bottom: 0px;">Selection sort is a straightforward sorting algorithm that repeatedly selects the smallest (or largest) element from an unsorted portion of a list and moves it to the beginning (or end) of the list. The algorithm maintains two subarrays within the list.</p>
</div>
</div>
</section>
</section>
<div id="special_operations" style="display: block; flex-direction: column;">
<p
style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-weight: 500; font-size: 20px; padding-left: 20px;">
Selection Sort</p>
<div style="padding: 10px; padding-left: 20px;">
<div style="display: flex;">
<!-- <input type="submit" onclick=bubbleSort() id="sorting" value="Sort"> -->
<button onclick=selectionSort() class="sorting_btn" id="sorting_btn"><i
class="fa-solid fa-play"></i> Sort</button>
<button style="display: none; margin-left: 5px;" class="sorting_btn" id="refresh" onclick="refersh()"><i class="fa-solid fa-arrows-rotate"></i> Refresh</button>
</div>
</div>
</div>
</section>
</section>
<script src="javascript/selection_sort.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
</body>
</html>