Jump to content

Hey Coders!


G+_Nevrin O
 Share

Recommended Posts

Hey Coders! After watching episode 15 it reminded me of a program I wrote years ago and so I decided to adapt it to work in python.

 

It is a program that takes several sorting algorithms and time them to see what sorts faster.

 

It was intended to work with arrays not pythons lists but I didn't want to over complicate beginners by using pythons array system when lists work so well.

So none of the ones I wrote take advantage of some of the things that make lists so useful. They all treat the lists as if they are arrays so that means they will probably not be as efficient as they could be if properly designed for python.

So think of it more as a concept of different sorting methods as apposed to the proper way to sort in python

That being said they are still quite accurate.

Thanks all, please comment below.

https://github.com/NevrinO/Coding/blob/master/Python/Sorting.py

Link to comment
Share on other sites

Great showcase of popular sorting algorithms. I had to write many of those myself in the college days. I'll have to take a closer look at the Heap sort. I've never understood how it works. I think the only one I've used professionally is the Quicksort back in the TurboPascal days.

Link to comment
Share on other sites

 Share

×
×
  • Create New...