SlideShare una empresa de Scribd logo
1 de 9
Data Structure and Algorithm
9/12/2021 Mamta Bhattarai
Introduction To Data Structure
• Data Structure is a way of collecting and organizing data in such a way
that we can perform operations on these data in an effective way.
• Data Structures is about rendering data elements in terms of some
relationship, for better organization and storage.
• For example, we have some data which has, Student name “Rohan"
and Roll 20. Here “Rohan" is of String data type and 20 is
of integer data type.
• We can organize this data as a record like Student record, which will
have both name and Roll in it. Now we can collect and store student
records in a file or database as a data structure. For example:
“Mohan" 30”, “Sohan" 31, “Rena" 33 etc.
9/12/2021 Mamta Bhattarai
Basic types of Data Structures
9/12/2021 Mamta Bhattarai
Basic types of Data Structures
Data structure can be categorized into two part:
Built-in Data Structure(Primitive DS): Data structure for which a
language has built-in support are known as Built-in Data Structure: EX
integer, float, .
User define Data structure(Non-Primitive DS): Array, List, stack, Linked
List, stack, Queue, Tree, Graph etc.
9/12/2021 Mamta Bhattarai
Characterstic Description
Linear In Linear data structures,the data items are arranged in a linear sequence.
Example: Array
Non-Linear In Non-Linear data structures,the data items are not in sequence.
Example: Tree, Graph
Homogeneous In homogeneous data structures,all the elements are of same type. Example: Array
Non-Homogeneous In Non-Homogeneous data structure, the elements may or may not be of the same
type. Example: Structures
Static Static data structures are those whose sizes and structures associated memory
locations are fixed, at compile time. Example: Array
Dynamic Dynamic structures are those which expands or shrinks depending upon the program
need and its execution. Also, their associated memory locations changes.
Example: Linked List created using pointers
9/12/2021 Mamta Bhattarai
Abstract Data Type(ADT)
• The abstract datatype is special kind of datatype, whose behavior is
defined by a set of values and set of operations.
• The keyword “Abstract” is used as we can use these datatypes, we
can perform different operations. But how those operations are
working that is totally hidden from the user.
• The ADT is made of with primitive datatypes, but operation logics are
hidden.
• Some examples of ADT are Stack, Queue, List etc.
9/12/2021 Mamta Bhattarai
Importance and advantages of DS
• Data Structures are the key part of many computer algorithms as they allow the
programmers to do data management in an efficient way.
• A right selection of data structure can enhance the efficiency of computer
program or algorithm in a better way.
• Why Data Structures are needed
• With increasing complexities in computer algorithms, the amount of data usage is
increasing, this can affect the performance of the application and can create
some areas of concern:
• Processing speed: To handle very large data, high-speed processing is required,
but with growing data, processor may fail to achieve required processing speed.
• Data Search: Getting a particular record from database should be quick and with
optimum use of resources.
• Multiple requests: To handle simultaneous requests from multiple users
9/12/2021 Mamta Bhattarai
Data Structure Advantages
• Efficient Memory use: With efficient use of data structure memory usage
can be optimized, for e.g we can use linked list vs arrays when we are not
sure about the size of data. When there is no more use of memory, it can
be released.
• Reusability: Data structures can be reused, i.e. once we have implemented
a particular data structure, we can use it at any other place.
Implementation of data structures can be compiled into libraries which can
be used by different clients.
• Abstraction: Data structure serves as the basis of abstract data types, the
data structure defines the physical form of ADT(Abstract Data Type). ADT is
theoretical and Data structure gives physical form to them.
9/12/2021 Mamta Bhattarai
Thank you
9/12/2021 Mamta Bhattarai

Más contenido relacionado

La actualidad más candente (20)

5 data resource management
5 data resource management5 data resource management
5 data resource management
 
Design approach
Design approachDesign approach
Design approach
 
Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)
 
Types of databases
Types of databasesTypes of databases
Types of databases
 
Database Management & Models
Database Management & ModelsDatabase Management & Models
Database Management & Models
 
Different data models
Different data modelsDifferent data models
Different data models
 
data resource management
 data resource management data resource management
data resource management
 
A Survey on Big Data Analytics
A Survey on Big Data AnalyticsA Survey on Big Data Analytics
A Survey on Big Data Analytics
 
Databases and types of databases
Databases and types of databasesDatabases and types of databases
Databases and types of databases
 
Database and types of database
Database and types of databaseDatabase and types of database
Database and types of database
 
Database overview
Database overviewDatabase overview
Database overview
 
11 Database Concepts
11 Database Concepts11 Database Concepts
11 Database Concepts
 
Data Abstraction
Data AbstractionData Abstraction
Data Abstraction
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
 
Database management system
Database management systemDatabase management system
Database management system
 
Group4 Unit5
Group4 Unit5Group4 Unit5
Group4 Unit5
 
Database and types of databases
Database and types of databasesDatabase and types of databases
Database and types of databases
 
Modern Database Systems - Lecture 00
Modern Database Systems - Lecture 00Modern Database Systems - Lecture 00
Modern Database Systems - Lecture 00
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
Database concepts
Database conceptsDatabase concepts
Database concepts
 

Similar a DSA

Lecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxLecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxArifKamal36
 
Database.pdf
Database.pdfDatabase.pdf
Database.pdfl235546
 
Presentaion on data structure mms-a-28
Presentaion on  data structure mms-a-28Presentaion on  data structure mms-a-28
Presentaion on data structure mms-a-28KhanSayeed2
 
Data Structure Introduction chapter 1
Data Structure Introduction chapter 1Data Structure Introduction chapter 1
Data Structure Introduction chapter 1vasantiDutta1
 
Data Structure Training Course Chandigarh
Data Structure Training Course ChandigarhData Structure Training Course Chandigarh
Data Structure Training Course ChandigarhManeetKaur68
 
Organisation information
Organisation  informationOrganisation  information
Organisation informationSelva Prakash
 
Introduction To Data WareHouse
Introduction To Data WareHouseIntroduction To Data WareHouse
Introduction To Data WareHouseSriniRao31
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to databasegagan bhattarai
 
Chapter 1( intro & overview)
Chapter 1( intro & overview)Chapter 1( intro & overview)
Chapter 1( intro & overview)MUHAMMAD AAMIR
 

Similar a DSA (20)

Lecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxLecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptx
 
DBMS unit 1.pptx
DBMS unit 1.pptxDBMS unit 1.pptx
DBMS unit 1.pptx
 
DBMS-Unit-1.pptx
DBMS-Unit-1.pptxDBMS-Unit-1.pptx
DBMS-Unit-1.pptx
 
Ch1_Intro-95(1).ppt
Ch1_Intro-95(1).pptCh1_Intro-95(1).ppt
Ch1_Intro-95(1).ppt
 
Database.pdf
Database.pdfDatabase.pdf
Database.pdf
 
Datastructures Notes
Datastructures NotesDatastructures Notes
Datastructures Notes
 
Presentaion on data structure mms-a-28
Presentaion on  data structure mms-a-28Presentaion on  data structure mms-a-28
Presentaion on data structure mms-a-28
 
Database system
Database system Database system
Database system
 
Data Structure Introduction chapter 1
Data Structure Introduction chapter 1Data Structure Introduction chapter 1
Data Structure Introduction chapter 1
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
Data Structure Training Course Chandigarh
Data Structure Training Course ChandigarhData Structure Training Course Chandigarh
Data Structure Training Course Chandigarh
 
Lect 1-2
Lect 1-2Lect 1-2
Lect 1-2
 
Lect 1-2 Zaheer Abbas
Lect 1-2 Zaheer AbbasLect 1-2 Zaheer Abbas
Lect 1-2 Zaheer Abbas
 
DBMS topic in PU
DBMS topic in PUDBMS topic in PU
DBMS topic in PU
 
UNIT I - Data Structures.pdf
UNIT I - Data Structures.pdfUNIT I - Data Structures.pdf
UNIT I - Data Structures.pdf
 
Organisation information
Organisation  informationOrganisation  information
Organisation information
 
Introduction To Data WareHouse
Introduction To Data WareHouseIntroduction To Data WareHouse
Introduction To Data WareHouse
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Chapter 1( intro & overview)
Chapter 1( intro & overview)Chapter 1( intro & overview)
Chapter 1( intro & overview)
 
Dbms notes
Dbms notesDbms notes
Dbms notes
 

Último

ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 

Último (20)

FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 

DSA

  • 1. Data Structure and Algorithm 9/12/2021 Mamta Bhattarai
  • 2. Introduction To Data Structure • Data Structure is a way of collecting and organizing data in such a way that we can perform operations on these data in an effective way. • Data Structures is about rendering data elements in terms of some relationship, for better organization and storage. • For example, we have some data which has, Student name “Rohan" and Roll 20. Here “Rohan" is of String data type and 20 is of integer data type. • We can organize this data as a record like Student record, which will have both name and Roll in it. Now we can collect and store student records in a file or database as a data structure. For example: “Mohan" 30”, “Sohan" 31, “Rena" 33 etc. 9/12/2021 Mamta Bhattarai
  • 3. Basic types of Data Structures 9/12/2021 Mamta Bhattarai
  • 4. Basic types of Data Structures Data structure can be categorized into two part: Built-in Data Structure(Primitive DS): Data structure for which a language has built-in support are known as Built-in Data Structure: EX integer, float, . User define Data structure(Non-Primitive DS): Array, List, stack, Linked List, stack, Queue, Tree, Graph etc. 9/12/2021 Mamta Bhattarai
  • 5. Characterstic Description Linear In Linear data structures,the data items are arranged in a linear sequence. Example: Array Non-Linear In Non-Linear data structures,the data items are not in sequence. Example: Tree, Graph Homogeneous In homogeneous data structures,all the elements are of same type. Example: Array Non-Homogeneous In Non-Homogeneous data structure, the elements may or may not be of the same type. Example: Structures Static Static data structures are those whose sizes and structures associated memory locations are fixed, at compile time. Example: Array Dynamic Dynamic structures are those which expands or shrinks depending upon the program need and its execution. Also, their associated memory locations changes. Example: Linked List created using pointers 9/12/2021 Mamta Bhattarai
  • 6. Abstract Data Type(ADT) • The abstract datatype is special kind of datatype, whose behavior is defined by a set of values and set of operations. • The keyword “Abstract” is used as we can use these datatypes, we can perform different operations. But how those operations are working that is totally hidden from the user. • The ADT is made of with primitive datatypes, but operation logics are hidden. • Some examples of ADT are Stack, Queue, List etc. 9/12/2021 Mamta Bhattarai
  • 7. Importance and advantages of DS • Data Structures are the key part of many computer algorithms as they allow the programmers to do data management in an efficient way. • A right selection of data structure can enhance the efficiency of computer program or algorithm in a better way. • Why Data Structures are needed • With increasing complexities in computer algorithms, the amount of data usage is increasing, this can affect the performance of the application and can create some areas of concern: • Processing speed: To handle very large data, high-speed processing is required, but with growing data, processor may fail to achieve required processing speed. • Data Search: Getting a particular record from database should be quick and with optimum use of resources. • Multiple requests: To handle simultaneous requests from multiple users 9/12/2021 Mamta Bhattarai
  • 8. Data Structure Advantages • Efficient Memory use: With efficient use of data structure memory usage can be optimized, for e.g we can use linked list vs arrays when we are not sure about the size of data. When there is no more use of memory, it can be released. • Reusability: Data structures can be reused, i.e. once we have implemented a particular data structure, we can use it at any other place. Implementation of data structures can be compiled into libraries which can be used by different clients. • Abstraction: Data structure serves as the basis of abstract data types, the data structure defines the physical form of ADT(Abstract Data Type). ADT is theoretical and Data structure gives physical form to them. 9/12/2021 Mamta Bhattarai