YOU ARE DOWNLOADING DOCUMENT

Please tick the box to continue:

Transcript
Page 1: Sorting Algorithms Presentation

Sharon ChiangGraham Johnson

Gabrielle Thivierge

Page 2: Sorting Algorithms Presentation

Sorting Algorithms

● What is a sorting algorithm?

● Why study them?

● What are the differences between algorithms?

Page 3: Sorting Algorithms Presentation

Comparison SortsDetermine the order of elements by

comparing their values

QuicksortMerge SortHeapsort

Comb SortSelection Sort

Shell SortBubble Sort

Insertion Sort

Non-Comparison Sorts

Use operators other than comparisonsMay require special conditions

Counting SortRadix SortBucket Sort

Page 4: Sorting Algorithms Presentation

Main Function Flow Chart

Page 5: Sorting Algorithms Presentation

Algorithm Analysis

● Parameterized each algorithm based on:○ Swaps○ Comparisons○ Array elements accessed○ Peak memory usage

● Algorithms processed data vectors of size 10 elements up to 1 million elements

Page 6: Sorting Algorithms Presentation
Page 7: Sorting Algorithms Presentation
Page 8: Sorting Algorithms Presentation
Page 9: Sorting Algorithms Presentation
Page 10: Sorting Algorithms Presentation

Conclusions

Merge sort● In general, comparison sorts are superior for

memory usage● Non-comparison sorts tend to access fewer array

elements, and are therefore generally faster● The merge sort performs well regarding both array

accesses/time and memory

And the winner is…

Page 11: Sorting Algorithms Presentation

Improvements and Future directions

● Improvements○ More algorithms○ More trials

● Future directions○ Different data types○ Mathematical

investigation


Related Documents