data structures and its importance

1,202 views 17 slides Jan 02, 2018
Slide 1
Slide 1 of 17
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17

About This Presentation

what is data structure
where it is used?
why we need to read this course?


Slide Content

Lecture 1 Data Structures

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

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

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

Good Programming Practices Programs and subprograms should be well structured. Use a modular approach for a complex problem. Use the basic control structures when developing each code segment. Sequence, selection, repetition Use local variables within subprograms. Use parameters to pass information to and from subprograms. Avoid global Variables. All source code should be documented. Each program should include opening documentation.   Each subprogram should be documented in a manner similar to programs.   Comments should be used to explain key code segments and / or segments whose purpose or design is not obvious.   Use meaningful identifiers.

Good Programming Practices Source code should be aesthetic; it should be formatted in a style that enhances its readability. Put each statement of the program on a separate line. Use uppercase and lowercase letters in a way that contributes to program readability. Put each {and} on separate lines. Align each {and corresponding}. When a statement is continued from one line to another, indent the continued line(s). Align the identifiers in each constant and variable declaration, placing each on a separate line. Insert blank lines between declarations and statements and between blocks of statements to make clear the structure of the program.

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

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/recovery of data Operation/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

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

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 m ake the difference between a program running in a few seconds or many days.

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.

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

Examples

Abstract Data Type (ADT) Abstraction Separating data from operation Generalization a concept or idea not associated with any specific instance ADT(Abstract Data Type) A collection of related data items together with basic operations between them and operations to be performed on them A data type is a collection of values and set of operation on those values values and operation that are implemented using a hardware or software data structure

abstract data type ( ADT )

implementation of an ADT

Goals of this Course Reinforce the concept that costs and benefits exist for every data structure. Learn the commonly used data structures. These form a programmer's basic data structure “toolkit”. 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.
Tags