Skip to content

Commit 47f8821

Browse files
committed
Added complexity info for Bubble Sort.
1 parent 2a987a7 commit 47f8821

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ <h2 class="algo-header">Bubble Sort</h2>
5959
Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list, compares
6060
adjacent elements and swaps them if they are in the wrong order.
6161
</span>
62+
<span class="algo-complexity">
63+
<ul>
64+
<li class="algo-info"><span class="complexity-item">Worst Complexity : </span><span class="complexity-value">N^2</span></li>
65+
<li class="algo-info"><span class="complexity-item">Average Complexity : </span><span class="complexity-value">N^2</span></li>
66+
<li class="algo-info"><span class="complexity-item">Best Complexity : </span><span class="complexity-value">N</span></li>
67+
<li class="algo-info"><span class="complexity-item">Space Complexity : </span><span class="complexity-value">1</span></li>
68+
<li class="algo-info"><span class="complexity-item">Method : </span><span class="complexity-value">Exchanging</span></li>
69+
<li class="algo-info"><span class="complexity-item">Stable : </span><span class="complexity-value">Yes</span></li>
70+
</ul>
71+
</span>
6272
</div>
6373

6474
<div id="comb-info" class="algo-container hidden">

0 commit comments

Comments
 (0)