Which sorting algorithm repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order?

  • Bubble Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
Bubble Sort is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares adjacent elements, and swaps them if they are in the wrong order. It is known for its simplicity but is less efficient than other sorting algorithms like Quick Sort and Merge Sort in terms of time complexity.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *