Comparision : 0
Swap : 0
Bubble Sort Algorithm
- Traverse from left and compare adjacent elements and the higher one is placed at right side.
- In this way, the largest element is moved to the rightmost end at first.
- This process is then continued to find the second largest and place it and so on until the data is sorted.
- Best Case Complexity: O(n)
- Average Case Complexity: O(n2)
- Worst Case Complexity: O(n2)
- Space Complexity: O(1)
What Indicates Colors ?
Compare The Element
Swap The Element