Vous êtes sur la page 1sur 2

ALGORITHM ANALYSIS PT 2 (THEORY) LAB # 4

By Isabella Duane Ia166

On my honor, as a Mississippi State University student, I have neither given nor received unauthorized assistance on this academic work.

CSE1384 Intermediate Computer Programming Class Section #12 Rikk Anderson Feb. 28, 2014

Analysis and Conclusions

The main goals of this class were to implement linear search, binary search, insertion sort and analize their complexities. Linear search has order of n time complexity, as analized below.

Binary search has order of

time complexity, as analized below.

Insertion Sort has order of n time complexity, as analized below.

For the binary_search procedure, I could have used a recursive algorithm for more clarity on the code, but I could not figure it out, in class, how to do it using only two parameters. Later, I could think that we could have two binary_search procedures, where the one required (with two parameters) calls the other one.

Vous aimerez peut-être aussi