Special Topic on
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
Linked List Implementation
A list in which each element has a
re 3-1 Sequentiality of Linear List
Figure 3-2 Categories
UnorderedRandom chronological list
Stacks and Queues
Prefix, Postfix, and Infix Expressions
Conversion of expressions
Stacks are linear data structures, that can
only be accessed at one end for storing and
Our First Data Structure
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
A basic rule for designing new things, is only
to include terms which have already been
To define an object in terms of
Graph theory is the study of the properties of
Graph a collection of nodes, called vertices,
and a collection of line segments, called lines,
connecting pairs of vertices.
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
Over previous weeks we have investigated
A linear data structure, used to implement queues or
Stacks and Queues do represent a hierarchy, it
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
Figure 5-1: Queue Concept.
the process used to find the location of a target
among a list of objects.
Basic Searching Methods for
normally used when a list is not sorted
it starts at the beg
Algorithm Efficiency, f(n)
generally defined as a function of the
number of elements being processed and
the type of loop being used.
How many times will the body of the loop be
repeated in a linear loop?
1. i =