There was an error while loading. Please reload this page.
1 parent 29d252e commit 5742bf5Copy full SHA for 5742bf5
Sorts/bubblesort.js
@@ -1,5 +1,7 @@
1
/*Bubble Sort is a algorithm to sort an array. It
2
* compares adjacent element and swaps thier position
3
+* The big O on bubble sort in worst and best case is O(N^2).
4
+ * Not efficient.
5
*/
6
function bubbleSort(items) {
7
var length = items.length;
@@ -25,3 +27,5 @@ console.log(ar);
25
27
bubbleSort(ar);
26
28
//Array after sort
29
console.log(ar);
30
+
31
0 commit comments