SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
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 make 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:
1. Analyze the problem to determine the
resource limitations a solution must meet.
2. Determine the basic operations that must
be supported. Count the resource
limitations for each operation.
3. Select the data structure that best meets
these requirements.
Examples
Searching an online phone directory: Linear search?
OK for small organizations
too slow for large ones
 Amount of data is an important factor.
Compiler lookup of an identifier's type, etc. in a symbol table:
Linear search? No, too slow
Binary search? No, too much work to keep sorted
 Number of accesses & speed required is an important factor.
Use hash tables
Text processing: Store in an array / vector?
OK for text analysis — word counts, average word length, etc.
Not for word-processing — Too inefficient if many insertions & deletions
   Static vs. dynamic nature of the data is an important factor
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)
a collection of
related data items together with
an assoicated set of operations
e.g. whole numbers (integers) and arithmetic operators for
addition, subtraction, multiplication and division.
Why "abstract?"
Data, operations, and relations are studied
independent of implementation.
What not how is the focus.
implementation of an ADT
consists of
storage structures (aka data structures) to store the data items
and
algorithms for the basic operations and relations.
The storage structures/data structures used in implementation are
provided in a language (primitive or built-in)
or built from the language constructs (user-defined).
In either case, successful software design uses data abstraction:
Separating the definition of a data type from its implementation.
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.

Weitere ähnliche Inhalte

Was ist angesagt?

Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxSyed Zaid Irshad
 
Algorithm Design Technique
Algorithm Design Technique Algorithm Design Technique
Algorithm Design Technique Bharat Bhushan
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessingankur bhalla
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST Kathirvel Ayyaswamy
 
Applications of data structures
Applications of data structuresApplications of data structures
Applications of data structuresWipro
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMSkoolkampus
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Dr. Pankaj Agarwal
 
OLAP operations
OLAP operationsOLAP operations
OLAP operationskunj desai
 
State space search
State space searchState space search
State space searchchauhankapil
 
Syntax directed translation
Syntax directed translationSyntax directed translation
Syntax directed translationAkshaya Arunan
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithmMohd Arif
 
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALADATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALASaikiran Panjala
 

Was ist angesagt? (20)

Multimedia Mining
Multimedia Mining Multimedia Mining
Multimedia Mining
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Clustering in Data Mining
Clustering in Data MiningClustering in Data Mining
Clustering in Data Mining
 
Algorithm Design Technique
Algorithm Design Technique Algorithm Design Technique
Algorithm Design Technique
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST
 
Applications of data structures
Applications of data structuresApplications of data structures
Applications of data structures
 
Data structure ppt
Data structure pptData structure ppt
Data structure ppt
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMS
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis
 
OLAP operations
OLAP operationsOLAP operations
OLAP operations
 
Data reduction
Data reductionData reduction
Data reduction
 
Graph mining ppt
Graph mining pptGraph mining ppt
Graph mining ppt
 
Np cooks theorem
Np cooks theoremNp cooks theorem
Np cooks theorem
 
State space search
State space searchState space search
State space search
 
Syntax directed translation
Syntax directed translationSyntax directed translation
Syntax directed translation
 
Clipping
ClippingClipping
Clipping
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALADATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
 

Ähnlich wie data structures and its importance

part 1 - intorduction data structure 2021 mte.ppt
part 1 -  intorduction data structure  2021 mte.pptpart 1 -  intorduction data structure  2021 mte.ppt
part 1 - intorduction data structure 2021 mte.pptabdoSelem1
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsAkhil Kaushik
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2RajSingh734307
 
Lecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxLecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxArifKamal36
 
Algorithms and Data Structures
Algorithms and Data StructuresAlgorithms and Data Structures
Algorithms and Data Structuressonykhan3
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMDr.Florence Dayana
 
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionarySe 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionarybabak danyal
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Dios Kurniawan
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm. Abdul salam
 
Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfDukeCalvin
 
DSA 1- Introduction.pdf
DSA 1- Introduction.pdfDSA 1- Introduction.pdf
DSA 1- Introduction.pdfAliyanAbbas1
 
System analysis and design
System analysis and designSystem analysis and design
System analysis and designRobinsonObura
 
Analysis of Algorithms_RR.pptx
Analysis of Algorithms_RR.pptxAnalysis of Algorithms_RR.pptx
Analysis of Algorithms_RR.pptxKarthikR780430
 
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptxAlgorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptxRobertCarreonBula
 
Basic of Data Structure - Data Structure - Notes
Basic of Data Structure - Data Structure - NotesBasic of Data Structure - Data Structure - Notes
Basic of Data Structure - Data Structure - NotesOmprakash Chauhan
 
Lesson 1 - Data Structures and Algorithms Overview.pdf
Lesson 1 - Data Structures and Algorithms Overview.pdfLesson 1 - Data Structures and Algorithms Overview.pdf
Lesson 1 - Data Structures and Algorithms Overview.pdfLeandroJrErcia
 

Ähnlich wie data structures and its importance (20)

part 1 - intorduction data structure 2021 mte.ppt
part 1 -  intorduction data structure  2021 mte.pptpart 1 -  intorduction data structure  2021 mte.ppt
part 1 - intorduction data structure 2021 mte.ppt
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & Algorithms
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2
 
Lecture 1 and 2
Lecture 1 and 2Lecture 1 and 2
Lecture 1 and 2
 
Lecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxLecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptx
 
Algorithms and Data Structures
Algorithms and Data StructuresAlgorithms and Data Structures
Algorithms and Data Structures
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
 
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionarySe 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm.
 
Unit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptxUnit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptx
 
DBMS Full.ppt
DBMS Full.pptDBMS Full.ppt
DBMS Full.ppt
 
Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdf
 
DSA 1- Introduction.pdf
DSA 1- Introduction.pdfDSA 1- Introduction.pdf
DSA 1- Introduction.pdf
 
System analysis and design
System analysis and designSystem analysis and design
System analysis and design
 
Analysis of Algorithms_RR.pptx
Analysis of Algorithms_RR.pptxAnalysis of Algorithms_RR.pptx
Analysis of Algorithms_RR.pptx
 
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptxAlgorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
 
Basic of Data Structure - Data Structure - Notes
Basic of Data Structure - Data Structure - NotesBasic of Data Structure - Data Structure - Notes
Basic of Data Structure - Data Structure - Notes
 
Lesson 1 - Data Structures and Algorithms Overview.pdf
Lesson 1 - Data Structures and Algorithms Overview.pdfLesson 1 - Data Structures and Algorithms Overview.pdf
Lesson 1 - Data Structures and Algorithms Overview.pdf
 
Lect 1-2 Zaheer Abbas
Lect 1-2 Zaheer AbbasLect 1-2 Zaheer Abbas
Lect 1-2 Zaheer Abbas
 

Mehr von Anaya Zafar

Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexityAnaya Zafar
 
Link list part 2
Link list part 2Link list part 2
Link list part 2Anaya Zafar
 
Link list part 1
Link list part 1Link list part 1
Link list part 1Anaya Zafar
 
Dijkstra's algorithm
Dijkstra's algorithm Dijkstra's algorithm
Dijkstra's algorithm Anaya Zafar
 
The miracle-morning
The miracle-morningThe miracle-morning
The miracle-morningAnaya Zafar
 
How to write a meeting agenda?
How to write a  meeting agenda?How to write a  meeting agenda?
How to write a meeting agenda?Anaya Zafar
 
How we achieve our goals
How we achieve our goalsHow we achieve our goals
How we achieve our goalsAnaya Zafar
 
Ch 22 question solution of fundamental of physics 8th edition by HRW
Ch 22  question solution of fundamental of physics 8th edition by HRWCh 22  question solution of fundamental of physics 8th edition by HRW
Ch 22 question solution of fundamental of physics 8th edition by HRWAnaya Zafar
 
Ch 21 question solution of fundamental of physics 8th edition by HRW
Ch 21 question solution of fundamental of physics 8th edition by HRWCh 21 question solution of fundamental of physics 8th edition by HRW
Ch 21 question solution of fundamental of physics 8th edition by HRWAnaya Zafar
 
Definition of capacitance
Definition of capacitanceDefinition of capacitance
Definition of capacitanceAnaya Zafar
 
Chapter 24-capacitance
Chapter 24-capacitanceChapter 24-capacitance
Chapter 24-capacitanceAnaya Zafar
 
Capacitance and dielectrics
Capacitance and dielectrics Capacitance and dielectrics
Capacitance and dielectrics Anaya Zafar
 
20 electric current resistance ohms law
20 electric current resistance ohms law20 electric current resistance ohms law
20 electric current resistance ohms lawAnaya Zafar
 
Voltage, current, resistance, and ohm's law
Voltage, current, resistance, and ohm's lawVoltage, current, resistance, and ohm's law
Voltage, current, resistance, and ohm's lawAnaya Zafar
 
Role of women in development
Role of women in developmentRole of women in development
Role of women in developmentAnaya Zafar
 
Application of Gauss's law
Application of  Gauss's lawApplication of  Gauss's law
Application of Gauss's lawAnaya Zafar
 
Why we need Gaussian surface in Gauss's law
Why we need Gaussian surface in Gauss's lawWhy we need Gaussian surface in Gauss's law
Why we need Gaussian surface in Gauss's lawAnaya Zafar
 

Mehr von Anaya Zafar (20)

heap sort
 heap sort heap sort
heap sort
 
Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexity
 
Link list part 2
Link list part 2Link list part 2
Link list part 2
 
Link list part 1
Link list part 1Link list part 1
Link list part 1
 
Dijkstra's algorithm
Dijkstra's algorithm Dijkstra's algorithm
Dijkstra's algorithm
 
The miracle-morning
The miracle-morningThe miracle-morning
The miracle-morning
 
How to write a meeting agenda?
How to write a  meeting agenda?How to write a  meeting agenda?
How to write a meeting agenda?
 
How we achieve our goals
How we achieve our goalsHow we achieve our goals
How we achieve our goals
 
Fiber optics
Fiber opticsFiber optics
Fiber optics
 
3 d technology
3 d technology3 d technology
3 d technology
 
Ch 22 question solution of fundamental of physics 8th edition by HRW
Ch 22  question solution of fundamental of physics 8th edition by HRWCh 22  question solution of fundamental of physics 8th edition by HRW
Ch 22 question solution of fundamental of physics 8th edition by HRW
 
Ch 21 question solution of fundamental of physics 8th edition by HRW
Ch 21 question solution of fundamental of physics 8th edition by HRWCh 21 question solution of fundamental of physics 8th edition by HRW
Ch 21 question solution of fundamental of physics 8th edition by HRW
 
Definition of capacitance
Definition of capacitanceDefinition of capacitance
Definition of capacitance
 
Chapter 24-capacitance
Chapter 24-capacitanceChapter 24-capacitance
Chapter 24-capacitance
 
Capacitance and dielectrics
Capacitance and dielectrics Capacitance and dielectrics
Capacitance and dielectrics
 
20 electric current resistance ohms law
20 electric current resistance ohms law20 electric current resistance ohms law
20 electric current resistance ohms law
 
Voltage, current, resistance, and ohm's law
Voltage, current, resistance, and ohm's lawVoltage, current, resistance, and ohm's law
Voltage, current, resistance, and ohm's law
 
Role of women in development
Role of women in developmentRole of women in development
Role of women in development
 
Application of Gauss's law
Application of  Gauss's lawApplication of  Gauss's law
Application of Gauss's law
 
Why we need Gaussian surface in Gauss's law
Why we need Gaussian surface in Gauss's lawWhy we need Gaussian surface in Gauss's law
Why we need Gaussian surface in Gauss's law
 

Kürzlich hochgeladen

Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Objectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxObjectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxMadhavi Dharankar
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
physiotherapy in Acne condition.....pptx
physiotherapy in Acne condition.....pptxphysiotherapy in Acne condition.....pptx
physiotherapy in Acne condition.....pptxAneriPatwari
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfChristalin Nelson
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
The role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenshipThe role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenshipKarl Donert
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxryandux83rd
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 

Kürzlich hochgeladen (20)

Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Objectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxObjectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptx
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
 
physiotherapy in Acne condition.....pptx
physiotherapy in Acne condition.....pptxphysiotherapy in Acne condition.....pptx
physiotherapy in Acne condition.....pptx
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdf
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
CARNAVAL COM MAGIA E EUFORIA _
CARNAVAL COM MAGIA E EUFORIA            _CARNAVAL COM MAGIA E EUFORIA            _
CARNAVAL COM MAGIA E EUFORIA _
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
The role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenshipThe role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenship
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptx
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 

data structures and its importance

  • 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. 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.
  • 6. 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.
  • 7. 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
  • 8. 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
  • 9. Need for Data Structures  Data structures organize data  more efficient programs.  More powerful computers  more complex applications.  More complex applications demand more calculations.
  • 10. 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.
  • 11. 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.
  • 12. Selecting a Data Structure Select a data structure as follows: 1. Analyze the problem to determine the resource limitations a solution must meet. 2. Determine the basic operations that must be supported. Count the resource limitations for each operation. 3. Select the data structure that best meets these requirements.
  • 13. Examples Searching an online phone directory: Linear search? OK for small organizations too slow for large ones  Amount of data is an important factor. Compiler lookup of an identifier's type, etc. in a symbol table: Linear search? No, too slow Binary search? No, too much work to keep sorted  Number of accesses & speed required is an important factor. Use hash tables Text processing: Store in an array / vector? OK for text analysis — word counts, average word length, etc. Not for word-processing — Too inefficient if many insertions & deletions    Static vs. dynamic nature of the data is an important factor
  • 14. 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
  • 15. abstract data type (ADT) a collection of related data items together with an assoicated set of operations e.g. whole numbers (integers) and arithmetic operators for addition, subtraction, multiplication and division. Why "abstract?" Data, operations, and relations are studied independent of implementation. What not how is the focus.
  • 16. implementation of an ADT consists of storage structures (aka data structures) to store the data items and algorithms for the basic operations and relations. The storage structures/data structures used in implementation are provided in a language (primitive or built-in) or built from the language constructs (user-defined). In either case, successful software design uses data abstraction: Separating the definition of a data type from its implementation.
  • 17. 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.