Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Structures: Introductory lecture

Similar presentations


Presentation on theme: "Data Structures: Introductory lecture"— Presentation transcript:

1 Data Structures: Introductory lecture
By: A. H. Abdul Hafez DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

2 Outlines What are Data Structures? What is this course looking at?
Course syllabus Detailed syllabus DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

3 What are Data Structures and Algorithms?
Programming and problem solving, with applications. Algorithm: method for solving a problem. Data structure: method to store information. DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

4 Why study Algorithms and Data Structures
To become a proficient programmer. “ I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships. ” — Linus Torvalds (creator of Linux) “ Algorithms + Data Structures = Programs. ” — Niklaus Wirth DAA, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

5 The Course is Looking at!
Data structures is concerned with the representation and manipulation of data. All programs manipulate data. So, all programs represent data in some way. Data manipulation requires an algorithm. Algorithm design methods needed to develop programs that do the data manipulation. The study of data structures and algorithms is fundamental to Computer Science. DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

6 The Course is Looking at!
To introduce basic data structures and operations for manipulating them. To provide students with theoretical and practical knowledge to analyses the data structure needs of particular problems. To provide students with theoretical and practical knowledge to compare the efficiency of various algorithms. DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

7 The Need for Data Structures
Data structures organize data  more efficient programs. More powerful computers  more complex applications. More complex applications demand more calculations. Complex computing tasks are unlike our everyday experience. DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

8 The Need for Data Structures: Efficiency
Data structures organize data  more efficient programs. Choice of data structure or algorithm can make the difference between a program running in a few seconds or many days. A solution is said to be efficient if it solves the problem within its resource constraints. Space Time Each problem has constraints on available space and time. DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

9 Costs and Benefits Each data structure has costs and benefits.
The cost of a solution is the amount of resources that the solution consumes. Any data structure requires: space for each data item it stores, time to perform each basic operation, programming effort. Rarely is one data structure better than another in all situations. Only after a careful analysis of problem characteristics, we can know the best data structure for the task. DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

10 Abstract Data Type Abstract Data Type (ADT): a definition for a data type solely in terms of a set of values and a set of operations on that data type. Each ADT operation is defined by its inputs and outputs. Operations are like: insert, search, delete, setvalue, getvalue, etc. Encapsulation: Hide implementation details. Header files vs. source files. Example: let’s have ordered list. We can initialize empty list, insert item, check for an item, etc. DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

11 Abstract Data Type A data structure is the physical implementation of an ADT. Each operation associated with the ADT is implemented by one or more subroutines in the implementation. Data structure usually refers to an organization for data in main memory. File structure: an organization for data on peripheral storage, such as a disk drive. DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

12 Logical vs. Physical Form
In a program, implement an ADT, then think only about the ADT, not its implementation. Data items have both a logical and a physical form. Logical form: definition of the data item within an ADT. Ex: Integers in mathematical sense: +, - Physical form: implementation of the data item within a data structure. Ex: 16/32 bit integers, overflow DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

13 Course Syllabus, 1semester DSA course
Introduction 1 weeks C Programming Review 1 week Structure and self referential structure 1 week Elementary data structures 1 week Arrays, lists Elementary data structures 2 weeks Stacks and queues Hash table 1 week Tree and Binary search tree 1 weeks Sorting and Heap sort 2 weeks Graphs 2 week DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

14 Prerequisite and texts.
TEXT BOOKS: T1: Sartaj Sahni, ‘Data structures algorithms and applications in C++’, University Press T2: Deitel and Deitel , “C How to Program”, 7th edition, Pearson. REFERENCE BOOKS: R1: “ Introduction to Algorithms” – T H Cormen, et al. , 3rd Edition. The MIT Press R2: ’Introduction to Design and Analysis of Algorithms’ – R C T Lee and T T Sai. R3: Clifford A. Shaffer ‘Data Structures and Algorithm Analysis’ , edition 3.2. DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018

15 The end of the Lecture Thanks for your time Questions are welcome
DS, by Dr. A.H. Abdul Hafez, CE Dept. HKU December 6, 2018


Download ppt "Data Structures: Introductory lecture"

Similar presentations


Ads by Google