Comp 352 Fall 2012
Tutorial Sessions 4
Session Outline
Array Lists:
Definition
Methods
Node Lists:
The position ADT
The Node List ADT
Simply Linked List
Doubly Linked Lists
The Sequence ADT
The Array List Definition
An Array List stores its elements in a
Comp 352 Fall 2012
Tutorial 9
Outline
Binary Search Trees
Search and Update Algorithms
Definitions
Performance
AVL Trees
Definitions
Update Operations / Rotations
Problem Solving
Binary Search Trees Definitions (1)
A binary search tree is a data structure
Comp 352 Fall 2012
Tutorial Session 1
Analysis and Complexity of
Algorithms:
What is Algorithms?
What do we mean by Complexity ?
How to measure Complexity ?
Analysis and Complexity of
Algorithms
Algorithm is a sequence of computational
steps that transfor
Comp 352 Fall 2012
Tutorial Session 2
-e
Session Outline
Quick Overview on Recursion:
Recursion Types
Definition
Towers of Hanoi Problem
Exercises:
Complexity Analysis Extra Problems
Recursion application exercises
Recursion & Complexity Problems
Quick Ov
Comp 352 Fall 2012
Tutorial Session 2
-e
w/sol
Complexity Analysis
Extra Exercises
Consider the following code
n is data size, k is a constant
for (i=0; i<n; i=i+k) 1+m=0n/k , i=km
for(j=0; j<i; j+)
1+j=0i
sum[j] = j * sum[i];
1
1 + m=0n/k(1+j=0i1) i=km
R