parent
25f3e9dcae
commit
dec247b04b
|
@ -1,7 +1,9 @@
|
||||||
# Bubble Sort
|
# Bubble Sort
|
||||||
|
|
||||||
Bubble Sort also known as Sinking Sort is the simplest sorting algorithm. It swaps the numbers if they are not in correct order. The Worst Case Time Complexity is O(n^2)
|
Bubble Sort also known as Sinking Sort is the simplest sorting algorithm. It swaps the numbers if they are not in correct order.
|
||||||
|
The Worst Case -
|
||||||
|
Time Complexity : O(n^2)
|
||||||
|
Space Compldxity : O(1) i.e it use constant space.
|
||||||
## Steps
|
## Steps
|
||||||
|
|
||||||
1. Compares the first element with the next element.
|
1. Compares the first element with the next element.
|
||||||
|
|
Loading…
Reference in New Issue