UP
Infix, Postfix and Prefix
Infix, Postfix and Prefix notations are three different but equivalent ways of writing expressions.
It is easiest to demonstrate the differences by looking at examples of operators that take two
operands.
Infix notation: X + Y

Backtracking Algorithm
General Concepts
Algorithm strategy
Algorithm structure
Approach to solving a problem
May combine several approaches
Iterative execute action in loop
Recursive
reapply action to subproblem(s)
Problem type
Satisfying
Optimization
f

Design and Analysis of
Computer Algorithm
Algorithm Analysis
1
Course Objectives
This course introduces students to the analysis and
design of computer algorithms. Upon completion of
this course, students will be able to do the
following:
Analyze the as

Brute Force Algorithm
1.
2.
3.
4.
5.
Selection sort
Brute-Force string matching
Polynomial Evaluation
Closest pair problem by brute force
Exhaustive search
Traveling salesman problem
Knapsack problem
Assignment problem
Expected Outcomes
Students should be

Analysis of Algorithms
Asymptotic Analysis
Analysis of Algorithms
An algorithm is a finite set of precise instructions
for performing a computation or for solving a
problem.
What is the goal of analysis of algorithms?
To compare algorithms mainly in te

Prepared By:
John Njoroge
Analyzing algorithms and asymptotic notation
Steps in problem solving
Algorithm analysis
Space complexity
Time complexity
Pseudo-code
Problem Solving: Main Steps
1. Problem definition
2. Algorithm design / Algorithm specific

Data structures and algorithms :Key focus areas.
Overview of the C+ programming language and concepts such as classes, which is a
template for creating objects. Objects are software constructs that group together state (data) and
behavior (functions), whi

BBT 1201: Data Structures and Algorithms
Lecture 7: Searching and Sorting Algorithms
Searching Algorithms
Consider the problem of searching an array of n items to find if a key value k exists.
There are two basic approaches to perform the search:
Sequenti

BBT 1201: Data
Structures and
Algorithms
Lecture 5: Recursion
What is recursion
Recursion is a programming technique in
which procedures call themselves.
Recursive procedures generally solve a
problem by reducing the problem to an
instance of the same pro

BBT 1201: Data
Structures and
Algorithms
Lecture 6: Binary Trees
Why do we need Trees
Lists, Stacks, and Queues are linear
relationships
Information often contains hierarchical
relationships
File directories or folders
Moves in a game
We can build a tree

BBT 1201: Data
Structures and
Algorithms
Lecture 1: Introduction to Data
Structures and Algorithms
Objectives
At the end of this lecture, you should be able
to:
Understand what an abstract data type is, and
how ADTs relate to software design.
Be familiar

Asymptotic Notation,
Asymptotic Notation,
Review of Functions &
Review of Functions &
Summations
Summations
March 6, 2016
Comp 122, Spring 2004
Asymptotic Complexity
Running time of an algorithm as a function of
input size n for large n.
Expressed using

Amortized
Amortized Analysis
Analysis
Amortized analysis
An amortized analysis is any strategy for
analyzing a sequence of operations to
show that the average cost per operation
is small, even though a single operation
within the sequence might be expensi