Chapter 1
Introduction
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, for use with Data Structures
book by Mark Allen Weiss
1
Objectives
This chapter reviews some pre-requisite
material we will need.
It is assumed you have already learned
much of this mat

CS/SE/CE 3345-002:
Data Structures and Introduction to
Algorithm Analysis, Handout #6
March 7, 2016
Announcement
Exam 2 will be held at 4:00 pm on Wed., March 30. There will be a review class on Wed., March
23.
Homework Assignment #4 (Due Date: March 23)

CS/SE/CE/TE 3345-002:
Data Structures and Introduction to
Algorithm Analysis, Handout #4
Feb. 15, 2016
Announcement
Midterm exam will be held at 4:00 pm on Wed., Feb. 24.
Programing Assignment # 2
Due Date
Sunday, March 13, 11:59 pm. Submit your files to

CS/SE/CE 3345-002:
Data Structures and Introduction to
Algorithm Analysis
Handout #3
Feb. 3, 2016
Announcement
The first exam, Midterm, is going to be given on Wed. Feb. 24, 2016. There will be a review class
on Wed. Feb. 17.
Homework Assignment # 2
Do th

n~v~/m Cr/76;
rdafimle 4: 41%th mas-Arks 9% V5"
W7 fair (4511) jdwwfc) 4,6593, b
.i if 75M at. 7 4,64 .3 24.? we
97% at o rec/d4 1:1.
,4:- 7., M Ike/42.4" :3 4 11/426. IQ W
.541: r 3' fro/9401994:
/. (k /u.'v) 446a Vtor' 4.44. 65.
1 (570.439 a, ff MI /7 .

A A? [#470 c: a. 0'!- tim w 3;
6'0 Zl? 754:4! (~1va %/ml/ auav 0a.
o'ffdm (up!) 6.141% a! 74 fun. (7/:
gure 6.2 A complete binary trce
I-l-l-I-
8 910111213
Figure 6. 3 Array implementation of complete binary tree #z '1
l .
4? .w-J. SfNJWlL W0": Z M 411.1

Original 34 8 64 51 32 21 Positions Moved
After p = 1 s 34 64 51 32 21 1
After 1) = 2 8 34 64 51 32 21 0
After p = 3 8 34 51 64 32 21 1
After p = s 32 34 51 64 21 3
After p = 5 s 21 32 34 51 , 64 4
ngm 1.1 Insertion sort after each pass 1 [wk
2 * Simpie i

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package arrayoflists;
import java.util.*;
import java.io.*;
public class A

CS/SE/CE 3345-002:
Data Structures and Introduction to
Algorithm Analysis
Handout #2
Jan. 20, 2016
Homework Assignment # 1
Do the following problems in the textbook:
page 27:
#1.5;
#1.7 (b);
#1.8 (a), (b);
#1.9;
#1.11(a) [hint: by induction];
#1.12 (a).
D

Red-Black Trees
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, based on
Data Structures and Algorithms in Java by
Goodrich and Tamassia
Red-Black Trees
A Red-Black tree is a binary search tree with
these traits:
Every node is either red or black.
The roo

Chapter 2
Algorithm Analysis
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, for use with Data
Structures book by Mark Allen Weiss
1
Algorithms
An algorithm is a set of steps to solve a
problem.
More than one algorithm may be written to
solve the same prob

Chapter 3
Lists, Stacks and Queues
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, for use with Data Structures
book by Mark Allen Weiss
1
Abstract Data Types
An abstract data type is a set of objects with a set
of operations.
It is a mathematical abstract

Chapter 4
Trees
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, for use with
Data Structures book by Mark Allen Weiss
1
Trees
Linked lists require O(N) time to traverse the list.
For large lists this is prohibitive.
A simple data structure called a tree c

Chapter 5
Hashing
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, for use with
Data Structures book by Mark Allen Weiss
1
Hashing
Hashing is a technique that can perform
inserts, deletions, and finds in constant
average time.
It does not support some of th

Priority Queues (Heaps)
Chapter 6
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, for use with
Data Structures book by Mark Allen Weiss
1
Introduction
A queue is a FIFO data structure.
Each item in the queue is treated equally.
There may be times when we

Sorting
Chapter 7
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, for use with
Data Structures book by Mark Allen Weiss
1
Sorting
Sorting is a common problem when working with
data.
Data is often collected in unsorted order and must
be sorted for reporting

The Disjoint Set ADT
Chapter 8
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, for use with
Data Structures book by Mark Allen Weiss
1
Disjoint Set ADT
This chapter introduces the disjoint set ADT.
The disjoint set involves two basic operations,
union and

Graph Algorithms
Chapter 9
Summer 2015
2015 by Greg Ozbirn, UT-Dallas, for use with
Data Structures book by Mark Allen Weiss
1
Definitions
A graph G = (V,E) consists of vertices, V, and
edges, E.
Each edge is a pair (v,w) where v and w are in V.
If th