You are on page 1of 22

Chapter 2 Efficiency

Algorithm Analysis (Time & Space Complexity)

Chapter 3 Chapter 4
Lists, Stacks, and Queues Trees (and Search)
Common Data Structures
Chapter 5 Chapter 6
Hashing Heaps / Priority Queues

Chapter 7 Chapter 9 Common Algorithms closely


Sorting Graph Algorithms related to the data structures

CSCI3320/8325: Data Structures 1


CSCI3320/8325: Data Structures 2
CSCI3320/8325: Data Structures 3
CSCI3320/8325: Data Structures 4
CSCI3320/8325: Data Structures 5
CSCI3320/8325: Data Structures 6
CSCI3320/8325: Data Structures 7
CSCI3320/8325: Data Structures 8
CSCI3320/8325: Data Structures 9
CSCI3320/8325: Data Structures 10
CSCI3320/8325: Data Structures 11
CSCI3320/8325: Data Structures 12
Complexity of the insertion operation is
O(h), where h is heap's height. Taking
into account completeness of the tree,
O(h) = O(log n), where n is number of
elements in a heap.

CSCI3320/8325: Data Structures 13


CSCI3320/8325: Data Structures 14
CSCI3320/8325: Data Structures 15
CSCI3320/8325: Data Structures 16
CSCI3320/8325: Data Structures 17
CSCI3320/8325: Data Structures 18
CSCI3320/8325: Data Structures 19
null path length (npl) of a node x
npl(x) = min distance to a descendant with 0 or 1 children
npl(null) = -1
npl(leaf) = 0
npl(single-child node) = 0

CSCI3320/8325: Data Structures 20


CSCI3320/8325: Data Structures 21
CSCI3320/8325: Data Structures 22

You might also like