








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Some concept of Data Structures are Abstract, Balance Factor, Complete Binary Tree, Dynamically, Storage, Implementation, Sequential Search, Advanced Data Structures, Graph Coloring Two, Insertion Sort. Main points of this lecture are: Runtime Efficiency, Time Efficiency, Space Efficiency, Tradeoffs, Doubly Linked List, Singly, Counters, Bottlenecks, Metrics Tools, Critical
Typology: Slides
1 / 14
This page cannot be seen from the preview
Don't miss anything!









Efficiency (Complexity)
Time Efficiency Improvements
Possibilities (some better than others!)
Moral - Choose the most appropriate algorithm(s) BEFORE program implementation
Asymptotic Analysis (Runtime Analysis)
T(n) = O(f(n))
Said: T of n is “on the order of f(n)
Common Functions in Big-Oh (Most Efficient to Least Efficient)
Constant growth. The runtime does not grow at all as a function of n. It is a constant. Basically, it is any operation that does not depend on the value of n to do its job. Has the slowest growth pattern (none!).
Examples:
Common Functions in Big-Oh (con’t)
Logarithmic growth. The runtime growth is proportional to the base 2 logarithm (lg) of n.
Example:
Common Functions in Big-Oh (con’t)
n log n growth. Any sorting algorithm that uses comparisons between elements is O(n lg n).
Examples
Common Functions in Big-Oh (con’t)
Polynomial growth. Runtime grows very rapidly.
Examples:
So, Which Algorithm Do I Choose?
So, Which Algorithm Do I Choose? (con’t)