SlideShare a Scribd company logo
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.
Ad

More Related Content

What's hot (20)

Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...
Drusilla918
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
sadique_ghitm
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
koolkampus
 
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddelCHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
mohamed khalaf alla mohamedain
 
Types of Machine Learning
Types of Machine LearningTypes of Machine Learning
Types of Machine Learning
Samra Shahzadi
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
Kuppusamy P
 
Unified process model
Unified process modelUnified process model
Unified process model
RyndaMaala
 
Elmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 pptElmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 ppt
AbhinavPandey274499
 
Rdbms
RdbmsRdbms
Rdbms
Muhammad Adeel Rajput
 
Issues in knowledge representation
Issues in knowledge representationIssues in knowledge representation
Issues in knowledge representation
Sravanthi Emani
 
Data models
Data modelsData models
Data models
Usman Tariq
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
Dr. C.V. Suresh Babu
 
Data Models
Data ModelsData Models
Data Models
RituBhargava7
 
Advance database systems (part 1)
Advance database systems (part 1)Advance database systems (part 1)
Advance database systems (part 1)
Abdullah Khosa
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
Dr. C.V. Suresh Babu
 
Database administrator
Database administratorDatabase administrator
Database administrator
Tech_MX
 
Machine learning and types
Machine learning and typesMachine learning and types
Machine learning and types
Padma Metta
 
Introduction to Information Retrieval
Introduction to Information RetrievalIntroduction to Information Retrieval
Introduction to Information Retrieval
Roi Blanco
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
Shubham Dwivedi
 
Relational databases
Relational databasesRelational databases
Relational databases
Fiddy Prasetiya
 
Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...
Drusilla918
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
sadique_ghitm
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
koolkampus
 
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddelCHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
mohamed khalaf alla mohamedain
 
Types of Machine Learning
Types of Machine LearningTypes of Machine Learning
Types of Machine Learning
Samra Shahzadi
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
Kuppusamy P
 
Unified process model
Unified process modelUnified process model
Unified process model
RyndaMaala
 
Issues in knowledge representation
Issues in knowledge representationIssues in knowledge representation
Issues in knowledge representation
Sravanthi Emani
 
Advance database systems (part 1)
Advance database systems (part 1)Advance database systems (part 1)
Advance database systems (part 1)
Abdullah Khosa
 
Database administrator
Database administratorDatabase administrator
Database administrator
Tech_MX
 
Machine learning and types
Machine learning and typesMachine learning and types
Machine learning and types
Padma Metta
 
Introduction to Information Retrieval
Introduction to Information RetrievalIntroduction to Information Retrieval
Introduction to Information Retrieval
Roi Blanco
 

Similar to 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
abdoSelem1
 
DSD Unit 1 Abstract Data Type data structures design notes.pptx
DSD Unit 1 Abstract Data Type data structures design notes.pptxDSD Unit 1 Abstract Data Type data structures design notes.pptx
DSD Unit 1 Abstract Data Type data structures design notes.pptx
yuvaraniit
 
Data Structure Introduction.pdfssssssssssss
Data Structure Introduction.pdfssssssssssssData Structure Introduction.pdfssssssssssss
Data Structure Introduction.pdfssssssssssss
parwarsmko98
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & Algorithms
Akhil Kaushik
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2
RajSingh734307
 
Lecture 1 and 2
Lecture 1 and 2Lecture 1 and 2
Lecture 1 and 2
SaheedTundeZubairSTA
 
Lecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxLecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptx
ArifKamal36
 
Algorithms and Data Structures
Algorithms and Data StructuresAlgorithms and Data Structures
Algorithms and Data Structures
sonykhan3
 
lecture1-220221114413Algorithims and data structures.pptx
lecture1-220221114413Algorithims and data structures.pptxlecture1-220221114413Algorithims and data structures.pptx
lecture1-220221114413Algorithims and data structures.pptx
smartashammari
 
lecture1-2202211144eeeee24444444413.pptx
lecture1-2202211144eeeee24444444413.pptxlecture1-2202211144eeeee24444444413.pptx
lecture1-2202211144eeeee24444444413.pptx
smartashammari
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
Dr.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 dictionary
babak danyal
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1
Dios Kurniawan
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm.
Abdul salam
 
Unit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptxUnit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptx
Nirmalavenkatachalam
 
DBMS Full.ppt
DBMS Full.pptDBMS Full.ppt
DBMS Full.ppt
pritikanamaity600
 
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
DukeCalvin
 
DSA 1- Introduction.pdf
DSA 1- Introduction.pdfDSA 1- Introduction.pdf
DSA 1- Introduction.pdf
AliyanAbbas1
 
INTRODUCTION TO DATA STRUCTURE & ABSTRACT DATA TYPE.pptx
INTRODUCTION TO  DATA STRUCTURE & ABSTRACT DATA TYPE.pptxINTRODUCTION TO  DATA STRUCTURE & ABSTRACT DATA TYPE.pptx
INTRODUCTION TO DATA STRUCTURE & ABSTRACT DATA TYPE.pptx
talhaarif554
 
System analysis and design
System analysis and designSystem analysis and design
System analysis and design
RobinsonObura
 
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
abdoSelem1
 
DSD Unit 1 Abstract Data Type data structures design notes.pptx
DSD Unit 1 Abstract Data Type data structures design notes.pptxDSD Unit 1 Abstract Data Type data structures design notes.pptx
DSD Unit 1 Abstract Data Type data structures design notes.pptx
yuvaraniit
 
Data Structure Introduction.pdfssssssssssss
Data Structure Introduction.pdfssssssssssssData Structure Introduction.pdfssssssssssss
Data Structure Introduction.pdfssssssssssss
parwarsmko98
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & Algorithms
Akhil Kaushik
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2
RajSingh734307
 
Lecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxLecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptx
ArifKamal36
 
Algorithms and Data Structures
Algorithms and Data StructuresAlgorithms and Data Structures
Algorithms and Data Structures
sonykhan3
 
lecture1-220221114413Algorithims and data structures.pptx
lecture1-220221114413Algorithims and data structures.pptxlecture1-220221114413Algorithims and data structures.pptx
lecture1-220221114413Algorithims and data structures.pptx
smartashammari
 
lecture1-2202211144eeeee24444444413.pptx
lecture1-2202211144eeeee24444444413.pptxlecture1-2202211144eeeee24444444413.pptx
lecture1-2202211144eeeee24444444413.pptx
smartashammari
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
Dr.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 dictionary
babak danyal
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1
Dios 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.pdf
DukeCalvin
 
DSA 1- Introduction.pdf
DSA 1- Introduction.pdfDSA 1- Introduction.pdf
DSA 1- Introduction.pdf
AliyanAbbas1
 
INTRODUCTION TO DATA STRUCTURE & ABSTRACT DATA TYPE.pptx
INTRODUCTION TO  DATA STRUCTURE & ABSTRACT DATA TYPE.pptxINTRODUCTION TO  DATA STRUCTURE & ABSTRACT DATA TYPE.pptx
INTRODUCTION TO DATA STRUCTURE & ABSTRACT DATA TYPE.pptx
talhaarif554
 
System analysis and design
System analysis and designSystem analysis and design
System analysis and design
RobinsonObura
 
Ad

More from Anaya Zafar (20)

heap sort
 heap sort heap sort
heap sort
Anaya Zafar
 
Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexity
Anaya Zafar
 
Link list part 2
Link list part 2Link list part 2
Link list part 2
Anaya Zafar
 
Link list part 1
Link list part 1Link list part 1
Link list part 1
Anaya 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-morning
Anaya 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 goals
Anaya Zafar
 
Fiber optics
Fiber opticsFiber optics
Fiber optics
Anaya Zafar
 
3 d technology
3 d technology3 d technology
3 d technology
Anaya 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 HRW
Anaya 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 HRW
Anaya Zafar
 
Definition of capacitance
Definition of capacitanceDefinition of capacitance
Definition of capacitance
Anaya Zafar
 
Chapter 24-capacitance
Chapter 24-capacitanceChapter 24-capacitance
Chapter 24-capacitance
Anaya 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 law
Anaya 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 law
Anaya Zafar
 
Role of women in development
Role of women in developmentRole of women in development
Role of women in development
Anaya Zafar
 
Application of Gauss's law
Application of  Gauss's lawApplication of  Gauss's law
Application of Gauss's law
Anaya 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 law
Anaya Zafar
 
Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexity
Anaya Zafar
 
Link list part 2
Link list part 2Link list part 2
Link list part 2
Anaya Zafar
 
Link list part 1
Link list part 1Link list part 1
Link list part 1
Anaya 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-morning
Anaya 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 goals
Anaya 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 HRW
Anaya 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 HRW
Anaya Zafar
 
Definition of capacitance
Definition of capacitanceDefinition of capacitance
Definition of capacitance
Anaya Zafar
 
Chapter 24-capacitance
Chapter 24-capacitanceChapter 24-capacitance
Chapter 24-capacitance
Anaya 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 law
Anaya 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 law
Anaya Zafar
 
Role of women in development
Role of women in developmentRole of women in development
Role of women in development
Anaya Zafar
 
Application of Gauss's law
Application of  Gauss's lawApplication of  Gauss's law
Application of Gauss's law
Anaya 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 law
Anaya Zafar
 
Ad

Recently uploaded (20)

SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 

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.