Download presentation

Presentation is loading. Please wait.

Published byMekhi Delany Modified about 1 year ago

1
Design and Analysis of Algorithms Review on time complexity, “in place”, “stable” Haidong Xue Summer 2012, at GSU

2
Time complexity of algorithms Execution time? – Pros: easy to obtain; Cons: not accurate Number Instructions? – Pros: very accurate; Cons: calculation is not straightforward Number of certain operations? – Pros: easy to calculate, generally accurate; Cons: not very calculate Asymptotic Notations Pros? Cons?

3
Time complexity of algorithms In the worst case for(int i=0; i

4
“in place” and “stable” in sorting algorithms AlgorithmWorst TimeExpected TimeExtra MemoryStable Insertion sortO(1) (in place)Can be Merge sortO(n)Can be Quick sortO(1) (in place)Can be Heap sortO(1) (in place)No Stable Not stable

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google