-
Notifications
You must be signed in to change notification settings - Fork 0
/
bubbleSort.html
219 lines (212 loc) · 7.59 KB
/
bubbleSort.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
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
218
219
<!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>Bubble Sort Visualization</title>
<link rel="shortcut icon" href="assets/img/logo.png" type="image/x-icon" />
<!-- Bootstrap 5 CDN -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD"
crossorigin="anonymous"
/>
<!-- Google Fonts CDN -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,500;1,500&display=swap"
rel="stylesheet"
/>
<!-- Sidebar CSS -->
<link rel="stylesheet" href="assets/css/sidebar.css" />
<!-- Custom CSS -->
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/bubbleSort.css" />
</head>
<body>
<!-- Side bar -->
<div
class="side-navbar active-nav d-flex justify-content-between flex-wrap flex-column bg-light"
id="sidebar"
>
<ul class="nav flex-column text-white w-80">
<a href="index.html" class="nav-link h3 text-white my-2">
<img src="assets/img/logo.png" alt="" class="w-50 nav-logo" />
</a>
<li class="nav-link">
<i class="fa-solid fa-magnifying-glass"></i>
<span class="mx-2">Searching</span>
<ul class="nav flex-column text-white w-100">
<li class="nav-link">
<a href="linearSearch.html">
<i class="fa-solid fa-timeline"></i>
<span class="mx-2">Linear Search</span>
</a>
</li>
<li class="nav-link">
<a href="binarySearch.html">
<i class="fa-solid fa-divide"></i>
<span class="mx-2">Binary Search</span>
</a>
</li>
</ul>
</li>
<li class="nav-link">
<i class="fa-solid fa-sort"></i>
<span class="mx-2 parentMenuItem">Sorting</span>
<ul class="nav flex-column text-white w-100">
<li class="nav-link">
<a href="bubbleSort.html">
<i class="fa-solid fa-table-columns"></i>
<span class="mx-2 childMenuItem">Bubble Sort</span>
</a>
</li>
<li class="nav-link">
<a href="insertionSort.html">
<i class="fa-brands fa-hive"></i>
<span class="mx-2">Insertion Sort</span>
</a>
</li>
</ul>
</li>
</ul>
<hr />
<ul class="nav flex-column text-white w-20">
<span class="text-dark text-center w-100 mb-2">
With
<span class="text-danger">❤</span>
Eswar Benarjee
</span>
<span class="nav-link d-flex justify-content-center h4 w-100 mb-5">
<a
href="https://leetcode.com/CodeBreaker231/"
target="_blank"
class="m-1 fs-3"
><img src="assets/img/leetcode.png" alt=""
/></a>
<a
href="https://www.linkedin.com/in/eswarbenarjeenaidu/"
class="m-1 fs-3"
target="_blank"
><i class="fa-brands fa-linkedin"></i
></a>
<a
href="https://github.com/EswarBenarjee?tab=repositories"
class="m-1 fs-3"
target="_blank"
><i class="fa-brands fa-github"></i
></a>
</span>
</ul>
<div></div>
</div>
<!-- Main Body -->
<!-- Main Wrapper -->
<div class="my-container active-cont">
<!-- Top Nav -->
<nav
class="navbar top-navbar navbar-light bg-light px-5 justify-content-md-end"
>
<a class="btn border-0 d-md-none" id="menu-btn"
><i class="fas fa-bars"></i
></a>
<div class="d-flex flex-direction-row">
<!-- Navbar elements -->
<li class="nav-link m-2 fw-bold">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-link m-2 fw-bold">
<a class="nav-link" href="bubbleSortCode.html">Cpp</a>
</li>
<li class="nav-link m-2 fw-bold">
<a class="nav-link" href="bubbleSortCode.html?code=python"
>Python</a
>
</li>
<li class="nav-link m-2 fw-bold">
<a class="nav-link" href="bubbleSortCode.html?code=java">Java</a>
</li>
</div>
</nav>
<!--End Top Nav -->
<!--End Top Nav -->
<div class="row m-2 d-block">
<div class="algoText p-5 w-100">
<h3 class="text-center mb-5">Bubble Sort</h3>
<div id="alert"><div style="height: 40px"></div></div>
<div id="bubbleSort" class="bubbleSort mb-5"></div>
<div class="row p-3">
<div class="col-md-12">
<p class="d-block m-auto mt-5 mb-4 searchDiv">
Enter Custom Array
<br />
<input type="text" id="customArray" />
</p>
</div>
</div>
<div class="row text-center">
<div class="col-md-3 p-2">
<div class="calmAlert w-100" onclick="create('random');">
Random <i class="fa-solid fa-shuffle"></i>
</div>
</div>
<div class="col-md-3 p-2">
<div class="calmAlert w-100" onclick="create('sorted');">
Sorted <i class="fa-solid fa-arrow-up-short-wide"></i>
</div>
</div>
<div class="col-md-3 p-2">
<div class="calmAlert w-100" onclick="create('nearlySorted');">
Nearly Sorted <i class="fa-solid fa-arrow-up-1-9"></i>
</div>
</div>
<div class="col-md-3 p-2">
<div class="calmAlert w-100" onclick="create('manyDuplicates');">
Many Duplicates <i class="fa-solid fa-copy"></i>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-md-4 p-2">
<button class="calmAlert w-100" onclick="create()">
Create
<i class="fa-solid fa-caret-up"></i>
</button>
</div>
<div class="col-md-4 p-2">
<button class="calmAlert w-100" id="sort" onclick="sort()">
Sort
</button>
</div>
<div class="col-md-4 p-2">
<a href="bubbleSortCode.html">
<button class="calmAlert w-100">Code</button>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
</body>
<!-- Bootstrap 5 CDN -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"
></script>
<!-- Sweet Alert 2 -->
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Font Awesome Kit -->
<script
src="https://kit.fontawesome.com/f187a22733.js"
crossorigin="anonymous"
></script>
<!-- Sidebar -->
<script src="assets//js/sidebar.js"></script>
<script src="assets//js/utils.js"></script>
<script src="assets//js/bubbleSort.js"></script>
</html>