Skip to content

Commit f86e657

Browse files
committed
final edit
1 parent b1a6681 commit f86e657

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sorting_visualizer.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,14 @@
162162
return new Promise(resolve=> setTimeout(resolve,ms));
163163
}
164164

165-
function bubsort()
165+
async function bubsort()
166166
{
167167
if(otheron==0)
168168
{
169169
otheron=3;
170170
list=document.getElementById("mylist").getElementsByTagName("li");
171-
bubblesort(list,height,height.length);
171+
let a=await bubblesort(list,height,height.length);
172+
otheron=0;
172173
}
173174
else
174175
{
@@ -192,8 +193,8 @@
192193

193194
if (n == 1)
194195
{
195-
otheron=0;
196-
return;
196+
//otheron=0;
197+
return;
197198
}
198199
for (i=0; i<n-1; i++)
199200
{

0 commit comments

Comments
 (0)