0% found this document useful (0 votes)
28 views

CPCS204 01 Introduction

The document discusses the goals and policies of a Data Structures course. The goals are to improve knowledge of standard data structures, algorithms, mathematical concepts for analyzing algorithms, and recursion. The course will cover arrays, linked lists, stacks, queues, trees and graphs. There will be quizzes, assignments, projects, and exams worth various percentages of the total grade. No bonus marks will be awarded for the final grade.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

CPCS204 01 Introduction

The document discusses the goals and policies of a Data Structures course. The goals are to improve knowledge of standard data structures, algorithms, mathematical concepts for analyzing algorithms, and recursion. The course will cover arrays, linked lists, stacks, queues, trees and graphs. There will be quizzes, assignments, projects, and exams worth various percentages of the total grade. No bonus marks will be awarded for the final grade.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 47

Data Structures - I

“No Bonus” marks for this course anymore

CP
CS
20
4

O my Lord! Expand for me my chest [with


assurance] and ease for me my task and untie
the knot from my tongue that they may
understand my speech. (Quran 20 : 25-28)

1 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP
CS
20
4
Goals
Data Structure - I

2 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP Goals
CS Improve knowledge of standard data structures and
abstract data types
20
4 Improve knowledge of standard algorithms used to
solve several classical problems

Cover some mathematical concepts that are useful for


the analysis of algorithms

Analyze the efficiency of solutions to problems

Learn about and be comfortable with recursion

3 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP Teaching Method
CS • This class is NOT used to teach you JAVA
20 • Majority of this class is used covering new data
4 structures, abstract data types, and algorithm analysis
• The teaching of these concepts dictate more
explanation and less of a focus on “code”
o Some code will be shown on the PowerPoint slides
• Such as after we explain a new abstract data type
• We’ll show the code of how you would implement it
o However, writing of actual code will most likely never be
done in class
• Again, that is not the purpose of this class
4 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan
Data Structures - I
“No Bonus” marks for this course anymore

CP Implementing an Algorithm in JAVA


CS • In this class, you will have an opportunity to improve
20 upon your ability to write programs that implement an
4 algorithm you have learned
• You must know the syntax of JAVA in order to properly and
effective do this
• There’s no set way to create code to implement an algorithm
• We have many set algorithms and data structures that
you will study
• Mostly, however, you will simply have to apply the data
structures and algorithms shown in class fairly directly
to solve the given problems
5 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan
Data Structures - I
“No Bonus” marks for this course anymore

CP
CS
Text Book
20
4 "Object-Oriented Data Structures Using
Java",
Nell Dale, Jones & Bartlett Learning; 3rd
edition (February 25, 2011). ISBN-10:
1449613543. ISBN-13: 978-1449613549.

6 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP
CS
Reference Book
20
4
“Schaum’s Outlines, Data Structures
with Java",
John R. Hubbard; McGraw-Hill; 2nd
edition (2007). ISBN-07-147698-9.

7 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP General Policies
CS
• Attendance must be 75% or more
20
• All written exams will be cumulative
4
• Quizzes will be on blackboard, No Makeup
• Plagiarism / cheating will result in 0% marks
• Pay regular visit to Blackboard
• Need help for Assignments; contact lab
instructor
• No scale up / bonus for final grade
8 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan
Data Structures - I
“No Bonus” marks for this course anymore

CP Assessments
CS Assessment Grading Percentage
20 Quizzes 05%
4
Lab & Project Work 30%
Assignments (3 * 5% each) 5%
Mid-Exam 1 10%
Final Exam 50%

9 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP
CS
20 Introduction to Data
4
Structure

10 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP What is Data?
CS • Data
20 o A collection of facts from which a conclusion may be drawn
4 o Example:
• Temperature is 35 degrees celcius
• Conclusion: It is HOT!
• Types of data:
o Textual: for example
» Your name (Muhammad)
o Numeric: for example
» Your id (090254)
o Audio: for example,
» Your voice

11 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP What are Data Type?


CS
• Data Type:
20
o Built-in construct of any programming
4 language to manipulate “basic types of data”
o Basic Types of Data
• Character
• Integer
• Real or Floating point number
o Example (Data Type):
• int, char, double etc ;

12 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP What are Data Structures?


CS
• Data Structure:
20
o A particular way of storing and organizing data
4 in a computer so that it can be used efficiently
o It is a group of data elements stored together
under one name
o It is also reffered as “Abstract Data Type (ADT)”
o Example:
• An array of integers
int examGrades[30];

13 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP Importance of Data Structures


CS
• Goal:
20 o We need to organize data
4 • For what purpose?
o To facilitate efficient
• storage of data
• retrieval of data
• manipulation of data
• Design Issue:
o The challenge is to select the most appropriate data
structure for the problem
• Such is one of the motivations for this course
14 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan
Data Structures - I
“No Bonus” marks for this course anymore

CP List of Data Structures


CS
• Arrays
20
4 • Linked List
• Stacks • Queues • Trees

• Graph
15 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan
Data Structures - I
“No Bonus” marks for this course anymore

CP Classification of Data Structures


CS
• Based on Existence:
20 o Physical data structures
4 • Can be created independently
• Array
• Linked List

o Logical data structures


• Can’t be created independently
• All others e.g.
• stack, queues, trees, graphs
16 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan
Data Structures - I
“No Bonus” marks for this course anymore

CP Classification of Data Structures


CS
• Based on Memory Allocation:
20
o Static (or fixed sized) data structures
4 • Such as arrays

o Dynamic data structures (change size as


needed)
• Such as Linked Lists

17 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP Classification of Data Structures


CS
• Based on Representation
20
o Linear data structures
4 • Arrays
• Linked lists
• Stack
• Queues
o Non-linear data structures
• Trees
• Graphs

18 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP Operations on Data Structures


CS
• Traversing
20
o Accessing/visiting each data element exactly
4 once so that certain items in the data may be
processed
• Searching
o Finding the location of a given data element
(key) in the structure
• Insertion:
o Adding a new data element to the structure
19 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan
Data Structures - I
“No Bonus” marks for this course anymore

CP Operations on Data Structures


CS
• Deletion
20
o Removing a data element from the structure
4
• Sorting
o Arrange the data elements in some logical
fashion
• ascending or descending
• Merging
o Combining data elements form two or more
data structures into one
20 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan
Data Structures - I
“No Bonus” marks for this course anymore

CP
CS
20
4
Review Questions
Introduction to Data
Structure

21 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 01
CS
• A collection of facts from which a
20
conclusion may be drawn is known as:
4 a) Information
b) Data
c) Both
d) None of above

22 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 02
CS
• Which of the followings is not an example
20
of “data”?
4 a) James hairs are “brown”
b) Ahmed wears “Ghutrah” and “Agal”
c) This is my laptop
d) The price of laptop is SAR 5000

23 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 03
CS
• Which of the followings is a valid type of
20
data?
4 a) Textual
b) Numeric
c) Sound
d) Image
e) All of above

24 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 04
CS
• What is “Data Type”
20
a) Built-in construct of language to handle basic
4 types of data
b) A particular way of storing and organizing
data in a computer so that it can be used
efficiently
c) Both
d) None of Above

25 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 05
CS
• What is “Data Structure”
20
a) Built-in construct of language to handle basic
4 types of data
b) A particular way of storing and organizing
data in a computer so that it can be used
efficiently
c) Both
d) None of Above

26 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 06
CS
• “Data Structure” is also known as “Abstract
20
Data Type”
4
a) True

b) False

27 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 07
CS
• The main purpose of “Data Structure” is to
20
facilitate efficient:
4 a) storage of data
b) retrieval of data
c) manipulation of data
d) All of Above

28 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 08
CS
• Which of the following is a “data type”?
20
a) String
4
b) Array
c) double
d) None of above

29 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 09
CS
• Which of the following is a “ADT”?
20
a) Array
4
b) Link List
c) Tree
d) Graph
e) All of above

30 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 10
CS
• Which of the following is a “physical” data
20
structure?
4 a) Array
b) Linked List
c) Stack
d) Queues
e) a) & b)

31 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 11
CS
• Which of the following is a “logical” data
20
structure?
4 a) Array
b) Linked List
c) Stack
d) Queues
e) c) & d)

32 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 12
CS
• Which of the following is “odd (different)”
20
in the following list w.r.t. its existence
4 a) Array
b) stack
c) string
d) tree
e) None

33 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 13
CS
• Which of the following is a “static” data
20
structure?
4 a) Array
b) Linked List
c) Stack
d) Queues
e) None of above

34 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 14
CS
• Which of the following is a “dynamic” data
20
structure?
4 a) Array
b) Linked List
c) Stack
d) Queues
e) All of above

35 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 15
CS
• Which of the following is “odd (different)”
20
in the following list w.r.t. memory allocation
4 a) Linked List
b) stack
c) string
d) tree
e) None

36 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 16
CS
• Which of the following is a “linear” data
20
structure?
4 a) Array
b) Linked List
c) Stack
d) Queues
e) All of above

37 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 17
CS
• Which of the following is a “Non-linear”
20
data structure?
4 a) Array
b) Graph
c) Stack
d) Tree
e) b) & d)

38 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 18
CS
• Which of the following is “odd (different)”
20
in the following list w.r.t their
4 representation
a) Linked List
b) Graph
c) Tree
d) None of above

39 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 19
CS
• Which of the following is a basic operation
20
of any Data Structure.
4 a) Sorting
b) Merging
c) Insertion
d) Deletion
e) All of above

40 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 20
CS
• “Accessing each data element exactly once”
20
is
4 a) Traversing
b) Searching
c) Insertion
d) Merging
e) None of above

41 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 21
CS
• “Finding the location of a given data
20
element” is
4 a) Traversing
b) Searching
c) Insertion
d) Merging
e) None of above

42 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 22
CS
• “Adding a new data element to the
20
structure” is
4 a) Traversing
b) Searching
c) Insertion
d) Merging
e) None of above

43 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 23
CS
• “Removing a data element from the
20
structure” is
4 a) Traversing
b) Searching
c) Sorting
d) Deletion
e) None of above

44 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 24
CS
• “Arrange the data elements in some logical
20
fashion” is
4 a) Traversing
b) Searching
c) Sorting
d) Merging
e) None of above

45 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP 25
CS
• “Combining data elements form two or
20
more data structures into one” is
4 a) Traversing
b) Searching
c) Sorting
d) Merging
e) None of above

46 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan


Data Structures - I
“No Bonus” marks for this course anymore

CP
CS
20
4

Allah (Alone) is
Sufficient for us, and He
is the Best Disposer of
affairs (for us).(Quran 3 : 173)
47 Dr. Jonathan (Yahya) Cazalas Dr. Muhammad Umair Ramzan

You might also like