Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 1 Data Structures Aamir Zia. Introduction Course outline Rules and regulations Course contents Good Programming Practices Data Types and Data.

Similar presentations


Presentation on theme: "Lecture 1 Data Structures Aamir Zia. Introduction Course outline Rules and regulations Course contents Good Programming Practices Data Types and Data."— Presentation transcript:

1 Lecture 1 Data Structures Aamir Zia

2 Introduction Course outline Rules and regulations Course contents Good Programming Practices Data Types and Data Structures ADT

3 Course Description Title: Data Structures and Algorithms Code: CMP-210 Credit Hours:3 Prerequisite: OOP Follow Up: Design and Analysis of Algorithms

4 Contents Introduction to Algorithms Arrays Stacks Recursion Queues Lists and its variations Trees Hashing Searching and sorting Techniques Graphs

5 Good Programming Practices Programs and subprograms should be well structured. All source code should be documented. Source code should be aesthetic; it should be formatted in a style that enhances its readability.

6 Data Types In computer programming, a data type is a classification identifying one of various types of data, such as floating-point,.. Simple (basic) – char, int, float, double Modifiers – signed, unsigned Qualifiers – static, const, volatile, void Structured (derived) – Arrays, structures, unions, classes Advanced (composite) – List, queues, stacks, trees, graphs

7 Data Structures and algorithms Algorithms – Outline, the essence of a computational procedure, step by step instruction Program – An implementation of an algorithm in some computer programming languages Data Structures – Goal: organize data – Criteria: facilitate efficient storage of data retrieval of data manipulation of data Process: – select and design appropriate data types Data may be organized in many different ways. the logical and mathematical model of a particular organization of data is called Data structure

8 Need for Data Structures  Data structures organize data  more efficient programs.  More powerful computers  more complex applications.  More complex applications demand more calculations.

9 Organizing Data  Any organization for a collection of records that can be searched, processed in any order, or modified.  The choice of data structure and algorithm can make the difference between a program running in a few seconds or many days.

10 Efficiency  A solution is said to be efficient if it solves the problem within its resource constraints. –Space –Time  The cost of a solution is the amount of resources that the solution consumes.

11 Selecting a Data Structure Select a data structure as follows: 1.Analyze the problem to determine the resource constraints a solution must meet. 2.Determine the basic operations that must be supported. Quantify the resource constraints for each operation. 3.Select the data structure that best meets these requirements.

12 Examples

13 Abstract Data Type (ADT) Abstraction – Separating data from implementation – Generalization – a concept or idea not associated with any specific instance ADT – A collection of related data items together with basic operations between them and operations to be performed on them

14 abstract data type (ADT)

15 implementation of an ADT

16 Goals of this Course 1.Reinforce the concept that costs and benefits exist for every data structure. 2.Learn the commonly used data structures. –These form a programmer's basic data structure “toolkit”. 3.Understand how to measure the cost of a data structure or program. –These techniques also allow you to judge the merits of new data structures that you or others might invent.


Download ppt "Lecture 1 Data Structures Aamir Zia. Introduction Course outline Rules and regulations Course contents Good Programming Practices Data Types and Data."

Similar presentations


Ads by Google