Algorithms: Complexity, Time-space
Tradeoff
1
Summary of Lesson:
Complexity of Algorithms
Time-Space Trade-off
Jane Kuria
10/5/2011
Kimathi
University
Complexity
2
An algorithm is a well-defined list of steps for
solving a particular problem. One major

DATA STRUCTURES
Data Structure
A group of data elements grouped under one name
=> members
STRUCT: A TYPE OF DATA STRUCTURE
Syntax of a Struct
struct type_name cfw_
member_type1 member_name1;
member_type2 member_name2;
member_type3 member_name3;
.
.
obje

MORE ON ADTS
1
Summary of Lesson:
Examples of abstract data-types
Concepts of Data Structures
Why are they required?
Study of algorithms
Jane Kuria
10/5/2011
Kimathi
University
The Stack as an Abstract Data Type
2
The representation of a stack as an a

INTRODUCTION TO DATA STRUCTURES
Summary of Lesson:
Uses of Data, Information
Introduction to Data Structures
Introduction to Abstract Data Types
Jane Kuria
Kimathi University
10/5/2011
The Use of Data
Before starting our discussion on data structures,

INTRODUCTION TO DATA STRUCTURES
Summary of Lesson:
Uses of Data, Information
Introduction to Data Structures
Introduction to Abstract Data Types
Jane Kuria
Kimathi University
10/5/2011
The Use of Data
Before starting our discussion on data structures,

INTRODUCTION TO DATA STRUCTURES
Summary of Lesson:
Uses of Data, Information
Introduction to Data Structures
Introduction to Abstract Data Types
Jane Kuria
Kimathi University
10/5/2011
The Use of Data
Before starting our discussion on data structures,

Kruskal's algorithm for extracting Minimum Spanning Tree
(MST)
This algorithm comes under the greedy method, which means that the objects are chosen to join
a growing collection by iteratively picking an object that minimizes some cost function.
Now, taki

ARRAYS,
1
Summary of Lesson:
Concept of Arrays
Different operations performed using Arrays
This lesson discusses a very common linear structure
called all array. Since arrays are usually easy to
traverse, search and sort, they are frequently used
to sto

Prim-Jarnik's algorithm for extracting Minimum Spanning
Tree (MST)
This algorithm comes under the greedy method, which means that the objects are chosen to join
a growing collection by iteratively picking an object that minimizes some cost function.
Now,

Moi University - Data Structures and Algorithms [Revision Question]
Question #1:
a) Assume the input to the Huffman coding algorithm is the following text (without the quotation
marks)
mimi na mama
Assuming no overheads, compute the compression ratio for