skasim / gutenberg_scifi

2 stars 1 forks source link

Algorithm Exercise: Sort gutenbergscifi.csv's word count #13

Open ndanielsen opened 9 years ago

ndanielsen commented 9 years ago

Read the file in and sort the word count for each using bubblesort and selectionsort algorithms.

Here is pseudocode for each:

http://www.algorithmist.com/index.php/Bubble_sort http://www.algorithmist.com/index.php/Selection_sort

For each, time the performance of sorting exercise with the 10%, 50% and 100% of the list. What do you notice?

Finally, try the python built-in sort() and time it with the % inputs above. Is it different?

Look up and see how python implements sort(). What is the big-O on that versus the others that you implemented?

ndanielsen commented 9 years ago

Feel free to put this in an ipython notebook or put your results on another github.

skasim commented 9 years ago

Created an ipython file in the sort folder testing out the sort algorithms. I conceptually understand the selection and bubble sorts, but had a hard time with the algorithms, especially for the bubble sort. It would be great if we could go over them in our session Thursday.

ndanielsen commented 9 years ago

sure thing, we can go through it graphically