Presentation is loading. Please wait.

Presentation is loading. Please wait.

Summary. Quiz #1 Program Introduction Complexity notion ADT – Stack – Queue – Tree (basics) CDS – Array – SLL.

Similar presentations


Presentation on theme: "Summary. Quiz #1 Program Introduction Complexity notion ADT – Stack – Queue – Tree (basics) CDS – Array – SLL."— Presentation transcript:

1 Summary

2 Quiz #1 Program Introduction Complexity notion ADT – Stack – Queue – Tree (basics) CDS – Array – SLL

3 Lectures- Summary Arrays Simple, fast Inflexible O(1) O(n) inc sort O(n) O(logn) binary search Add Delete Find Linked List Simple Flexible O(1) sort -> no adv O(1) - any O(n) - specific O(n) (no bin search)

4 C++ STL ContainerElement AccessInsert /DeleteIterator Pattern arrayconstO(n)Random stackConst (limited)O(n)Front queueconst (limited)O(n)Front, Back listO(n)constBidirectional vectorconstO(n)Random

5 Examples /user/rt/courses 1K Coen352/ 2K Coen343/ 1K Homework/ 1K Programs/ 1K Projects/ 1K Papers/ 1K Demos/ 1K Grades 8K Hw1 3K Hw2 2K Hw3 4K Pr1 57K Pr2 97K Pr3 74K buylow 26K sellhigh 55K market 4786K Grades 3K 5124K 249K 4874K 229K 4870K 82K 10K 4787K File system Tree (directory) External nodes  files, internal nods  directories Pb: Compute the space used by the directory Sol: Recursively given by the Sum of -Size of the directory - sizes of files in the directory - the space used by the children directory Postorder traversal


Download ppt "Summary. Quiz #1 Program Introduction Complexity notion ADT – Stack – Queue – Tree (basics) CDS – Array – SLL."

Similar presentations


Ads by Google