File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ if they are not in the intended order. The order can be ascending or descending.
13
13
## Complexity
14
14
Bubble Sort is one of the simplest sorting algorithms. Two loops are implemented in the algorithm.
15
15
### Time Complexities:
16
- * #### Worst Case Complexity: O($n^2$ )
16
+ * #### Worst Case Complexity: O(n< sup >2</ sup > )
17
17
If we want to sort in ascending order and the array is in descending order then, the worst case occurs.
18
18
* #### Best Case Complexities: O(n)
19
19
If the array is already sorted, then there is no need for sorting.
20
- * #### Average Case Complexity: O($n^2$ )
20
+ * #### Average Case Complexity: O(n< sup >2</ sup > )
21
21
It occurs when the elements of the array are in jumbled order (neither ascending nor descending).
22
22
23
23
### Space Complexity:
You can’t perform that action at this time.
0 commit comments