CMPT 127 Lecture Notes - Lecture 7: Pseudocode, Binary Search Algorithm, Sorting Algorithm

59 views5 pages

Document Summary

Description: in algorithm design, one of the first lessons is that the big-o the most important aspect: the slower the growth rate, the better the algorithm. But not all algorithms with the same growth rate are created equal; we have already seen several examples of this in class. In this question we will consider the growth rates of selection sort and insertion sort. Both sorting algorithms run in o(n2), but one is certainly more consistent in its running time than the other. This problem asks you to profile these two algorithms (given several constraints). Task: write your own c versions of selection sort and insertion sort, one function for each. The programmed functions must be based on the algorithms as given in class. Test that they work properly, and when you are satisfied that they are correct, you will profile each function using time() function in.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents