Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 908 Bytes

File metadata and controls

17 lines (13 loc) · 908 Bytes

Sorting-Algorithms-Python

Sorting Algorithms in Python: Bubble Sort, Selection Sort, Insertion Sort, Quick Sort, Merge Sort, Heap Sort

forthebadge

While it's beneficial to understand these sorting algorithms, in most Python projects you would probably use the sort functions already provided in the language.

Conclusion

Sorting algorithms gives us many ways to order our data. We looked at 6 different algorithms:

  • Bubble Sort.
  • Selection Sort.
  • Insertion Sort.
  • Quick Sort.
  • Merge Sort.
  • Heap Sort.

The amount of comparison and swaps the algorithm performs along with the environment the code runs are key determinants of performance. In real Python applications, it's recommended we stick with the built in Python sort functions for their flexibility on the input and speed.