Sorting algorithms

Hello, I don’t know why all algorithms are appearing similar to me ? Could you please tell me the difference in selection sort, bubble sort and insertion sort ?

Hey @yashsharma4304
The basic ideas are as below:

  • Selection sort : repeatedly pick the smallest element to append to the result.
  • Insertion sort : repeatedly add new element to the sorted result.
  • Bubble sort : repeatedly compare neighbor pairs and swap if necessary.

Here use this to visualize alll of them : https://www.cs.usfca.edu/~galles/visualization/ComparisonSort.html

1 Like

Thanks for this :slightly_smiling_face:.

Here use this to visualize alll of them : https://www.cs.usfca.edu/~galles/visualization/ComparisonSort.html

1 Like