Data Structures and
Data Structures and
Algorithm Analysis
Algorithm Analysis
Searching
Part 1
Prepared by : Harprith Kaur
Randhawa
Searching
Searching is the process of finding
the location of a target among a
list of objects.
There are two basic searc

Data Structures and
Data Structures and
Algorithm Analysis
Algorithm Analysis
Introduction to Tree
Prepared by : Harprith Kaur Randhawa
Prepared by Harprith
1
Objectives
Learn the terminology associated
with tress.
Understand the difference between a
bi

Data Structures and
Data Structures and
Algorithm Analysis
Algorithm Analysis
Binary Search Tree
Prepared by : Harprith Kaur Randhawa
Prepared by Harprith
1
Objectives
Understand the basic structure of
a Binary Search Tree. (BST)
Understand the basic al

Background Studies
The company was incorporated on October 6, 1976 and was listed on the main board
of Bursa Malaysia on 10 August 1992.
One of its major projects was the Stormwater Management and Road Tunnel
(SMART Tunnel) project - a 50:50 joint venture

Background Studies
The Top Glove success story began 25 years ago in 1991.
Once a local business enterprise with a single factory and 3 production lines, it has
since flourished into the worlds largest rubber glove manufacturer, owning and operating 28
fa

Data
Data Structures
Structures and
and
Algorithm
Algorithm Analysis
Analysis
Introduction
Prepared by : Harprith Kaur
Data Structures and
Algorithm
Algorithm : Outline the essence
of a computational procedure, step
by step instructions.
Program : an im

1. Does using emoticons help you express your emotions effectively? Explain.
Yes, emoticons can be used to show emotions and at the same time can be used to
encourage, negotiate, charm, tease and cajole recipients.
2. Provide specific examples from your

1. What is the difference between recognition and recall in relation to human memory? Discuss the
design implications of this for interface designers.
Recognition is the knowledge that you have seen something presented to you.
Recall is the production of

tutorial chp?
1. explain the interaction type that would support the touchless interaction described above.
(9marks)
direct manipulation would support the wide range of activities and not burden the short term
memory of users.(2.5marks)
surgeons should b

Tutorial chp2
Question 1
You have been asked to develop a medical
Encyclopaedia for elderly users. The content should cover various health related issues focusing on
elderly patients such as health problems, and maintaining a healthy lifestyle. What is/ar

Data
Data Structures
Structures and
and
Algorithm
Algorithm Analysis
Analysis
HEAP TREE
Prepared by : Harprith Kaur Randhawa
Prepared by Harprith
1
Objectives
Understand the concept of a Heap
tree.
Understand the process of re-heap
up and re-heap down
P

Data
Data Structures
Structures and
and
Algorithm
Algorithm Analysis
Analysis
AVL TREE
Prepared by : Harprith Kaur Randhawa
Prepared by Harprith
1
Objectives
Understand the concept of an AVL
tree.
Understand how AVL trees and
BST trees differ.
Understa

GRAPH
INTRODUCTION
A graph is like a tree. It is a nonlinear data structure
consisting of nodes and links between the nodes.
However, not like a tree, the nodes in a graph is not in a
specific order.
Graph nodes can be linked in any pattern.
The nodes

Computing
Computing Algorithm
Algorithm
Efficiency
Efficiency
Lecture 2
Prepared by : Harprith Kaur
Randhawa
1
What is a good
algorithm?
An algorithm is efficient when the
program has a small running time and
use less space.
Efficient :
Running time
S

Recursive Function
Prepared by Harprith
Prepared by : Harprith Kaur
Introduction
A repetitive algorithm is simply code that
needs to be run over and over again.
In general, there are 2 approaches to writing
repetitive algorithms:-
Iteration
Recursion
We w

Linked List
Part 1
Prepared by Harprith
Objectives
Understand the basic building blocks of a
linked list.
Understand the advantages and disadvantages
of using a linked list.
Understand the basic insertion and deletion
operations associated with linked

Data Structures and
Data Structures and
Algorithm Analysis
Algorithm Analysis
Hashing
Prepared by : Harprith Kaur
Randhawa
Hashing
Our prior search techniques required several
tests before we found the data.
In a perfect world, we would know exactly whe

Data
Data Structures
Structures and
and
Algorithms
Algorithms
PRG3201
PRG3201
Array
Prepared by : Harprith Kaur
1
Objectives
To
To
To
To
understand
understand
understand
understand
how to define an array data structure.
how to use an array
how to define a

Linked List
Part 2
Prepared by : Harprith Kaur
Node Class
public class Node
cfw_
int num;
Node next;
int getNum()
cfw_
return num;
Node()
cfw_
num = 0;
next = null;
Node getNext()
cfw_
return next;
void setNext(Node next)
cfw_
this.next = next;
Node(i

Data Structures and
Data Structures and
Algorithm Analysis
Algorithm Analysis
Collision Resolution
Prepared by : Harprith Kaur
Randhawa
Collision Resolution
With the exception of direct hashing and
subtraction hashing, none of the hashing
methods result

Data Structures and Algorithm
Analysis
Stack
Prepared by : Harprith Kaur Randhawa
Objectives
Understand the basic nature of a stack
Understand the push and pop operations.
Understand the linked list implementation of a
stack.
Introduction
A stack is l

Data Structures and Algorithm
Analysis
QUEUE
Prepared by : Harprith Kaur
Objectives
Understand the basic nature of a queue
Understand the enqueue and dequeue
operations.
Understand the linked list implementation of a
queue.
Introduction
A queue is a l

Chapter 4
Design Principles
Ben Shneidermans 8 Golden Rules
Design Rules Ben Shneidermans 8
Golden Rules
Rule 1:Strive for consistency
Consistent sequences of actions should be
required in similar situations
Identical terminologies
Menus
Help screens