Chapter 4
Special Topic on
Stack Implementation
Figure 4-1
Figure 4-2
Figure 4-3
Figure 4-4
Rule 1: Scan the input string (infix notation) from
left to right. One pass is sufficient.
Rule 2: If the next symbol scanned is an operand, it
may be immediately

Chapter 3
Linked List Implementation
of
Linear Lists
Linear List
A list in which each element has a
unique successor
Ex.
Array
Deletion
Insertion
re 3-1 Sequentiality of Linear List
Figure 3-2 Categories
General List
UnorderedRandom chronological list

Chapter 4
Stacks and Queues
Stacks
Prefix, Postfix, and Infix Expressions
Conversion of expressions
Manual conversion
Stack implementation
Queues
Stacks are linear data structures, that can
only be accessed at one end for storing and
retrieving data.

Chapter 3
Linked Lists
Our First Data Structure
Linked Lists
Singly
Doubly
Circular
This week we will look at linked lists.
Why to use linked lists?
How to use linked lists?
Different Types of linked list.
But first, lets review arrays.
A very use

Recursion
Chapter 5
Recursion
Tail Recursion
Non-tail Recursion
Indirect Recursion
Nested Recursion
Excessive Recursion
A basic rule for designing new things, is only
to include terms which have already been
defined.
To define an object in terms of

Chapter 12
Graphs
Definitions
Graph theory is the study of the properties of
graphs.
Graph a collection of nodes, called vertices,
and a collection of line segments, called lines,
connecting pairs of vertices.
Applications
Electronic circuits
cslab1a
c

Chapter 5
Recursion
Definition
Recursion is a repetitive process in which an
algorithm calls itself
Figure 5-1 Iterative algorithm definition
Figure 5-2 Recursvie algorithm definition
Figure 5-3 Factorial(3) recursively
Figure 5-4 Calling a recursive algo

CS 133 Data Structures and
File Organization
Chapter 6
Binary Tree
Linked Lists
Over previous weeks we have investigated
Linked Lists
A linear data structure, used to implement queues or
stacks etc.
Stacks and Queues do represent a hierarchy, it
is how

Chapter 5
Queues
A queue a linear list in which data can be inserted at
one end, called the rear, and deleted from the other
end, called front. It is a first in first out restricted
data structure.
Figure 5-1: Queue Concept.
Queue Operations
Enqueue inse

Sorting
1
Chapter Objectives
Describe the three kinds of sorting methods
Selection, exchange, and insertion
Look at examples of each kind of sort that are O(n2) sorts
Simple selection, bubble, and insertion sorts
Study heaps, show how used for efficient

Chapter 2
Searching
Searching
the process used to find the location of a target
among a list of objects.
Basic Searching Methods for
Arrays
Sequential search
Binary search
Sequential search
normally used when a list is not sorted
it starts at the beg

Algorithm
Efficiency
Algorithm Efficiency, f(n)
generally defined as a function of the
number of elements being processed and
the type of loop being used.
Linear Loops
How many times will the body of the loop be
repeated in a linear loop?
Example:
1. i =