What is the primary advantage of selection sort over bubble sort?

  • Less data movement
  • More adaptable
  • Space complexity is lower
  • Time complexity is lower
The primary advantage of selection sort over bubble sort is that it has less data movement. While both have the same time complexity of O(n^2), selection sort performs fewer swaps, making it more efficient in scenarios where minimizing data movement is crucial.
Add your answer
Loading...

Leave a comment

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