SlideShare a Scribd company logo
INTRODUCTION TO DATA
STRUCTURES
CS1301 DATA STRUCTURES
USING PYTHON
UNIT-1 LINEAR DATA
STRUCTURES
Basic Terminologies
zaid shabbir
Data Structure
Data: are simply a value are set of values of different
type which is called data types like string, integer, char
etc.
Structure: Way of organizing information, so that it is
easier to use
In simple words :
Its a way organizing data in such a way so that data can be
easier to use.
What is Data structure?
• It is a format for storing data in an organized
manner.
• A logical way of storing data and it also define
mechanism of retrieve data
• Abstract way to organize information.
Why do we need Data structures?
• Human requirement with computer are going to
complex day by day. To solve the complex
requirements in efficient way we need this study.
• It is a method/ technique for storing and organizing
the information in a computing machine.
• Since it is all organized and well maintained,
storage is properly taken care of and the data being
searched for can be retrieved very easily and f
• Generally classified as:
1. Primitive:- Primitive data types are
predefined types of data, which are supported
by the programming language. For example,
integer, character, and string are all primitive
data types.
2. Non Primitive :-Not defined by the
programming language, but are instead created
by the programmer.
Classification of Data structures
Operation on Linear/Non-Linear
Data Structure
●
●
●
●
●
Add an element
Delete an element
Traverse / Display
Sort the list of elements
Search for a data element
Types of Data Structure
Array:
• An array is defined as it is a collection of items
stored at contiguous memory locations.
• Arrays are the set of homogeneous data
elements stored in RAM, therefore, it can hold
only one type of data.
Pros: Fast Access
Memory consumption is minimal
Cons: Insertion and deletion is complicated
Types of Data Structure ...
Stack: A stack is a data structure in
which items can be inserted only from
one end and get items back from the
same end.
There , the last item inserted into
stack, is the the first item to be taken
out from the stack.
In short its also called Last in First
out [LIFO].
zaid shabbir
• Operations performed here:
Push :- add a element in stack
Pop :- remove an element in stack
• ADVANTAGES
1. Easy to started
2. Less Hardware
Requirement
3. Cross- Platform
• DIS ADVANTAGES
1. not flexible
2. Lack of scailability
Types of Data Structure ...
QUEUE: A queue is two ended
data structure in which items can
be inserted from one end and
taken out from other end.
Therefore , the first item inserted
into queue is the first item to be
taken out from the queue.
This property is called First in
First out [FIFO].
zaid shabbir
• Operations performed here:
Enqueue:- add a element in queue
Dequeue :- remove an element in queue
• Pros:
1. Being able to handle
multiple data types
2. Flexibility and fast.
• Cons:
1. A new element can only
be inserted when all of the
elements are deleted from
the queue.
Types of Data Structure ...
Linked List: In linked list space to store items is
created as is needed and destroyed when space no
longer required to store items.
It is a linear collection of data elements. It has two
parts:
1.Info :- gives information
2. other’s link part.- gives other node’s address
Hence linked list is a dynamic data structure.
• Operations performed in Linked list
Traversing
Searching
Insertion
Deletion
• Pros:
1. You can also decrease and increase
the linked list at run-time.
2. Memory is well utilized in the linked list. Because in it, we do not
have to allocate memory in advance.
3. Its access time is very fast, and it can be accessed at a certain
time without memory overhead.
• Cons
1. The linked list requires more memory to store the elements than
an array, because each node of the linked list points a pointer,
due to which it requires more memory.
2. It is very difficult to traverse the nodes in a linked list.
Types of Data Structure ...
• Tree: Non-linear data structure which is
mainly used to represent data containing a
hierarchical relationship between elements
• The data structure which
reflects this relationship is
called tree.
• Operations
1. Traversing
2. Searching
3. Insertion a
4. Deletion
• Pros:
1. It provides an efficient insertion and searching operations.
2. Trees are flexible.
• Cons:
1. A small change in the data can cause a large change in the
structure of the decision tree causing instability
2. It is relatively expensive as the complexity and time has
taken are more.
Types of Data Structure ...
Graph: Data sometimes contain a relationship
between pairs of elements which is not
necessarily hierarchical in nature.
For example, an airline flies only between cities
connected by lines.
It is a set of items connected by edges. Each
item is called a vertex or node.
• Trees are just like a special kinds of
graphs. Graphs are usually represented by
G = (V, E), where V is the set vertices and
E is the set of Edges.
• Operations Performed:
• Searching
• Insertion
• deletion
Types of Data Structure ...
Undirected Graph: A graph
whose edges are unordered
pair of vertices. That is each
edge connects two vertices.
In an undirected graph, direction
is not important, if the path is
available, it can be traversed in
any direction.
zaid shabbir
Types of Data Structure ...
Directed Graph: In directed graph a directional
edge connect two node/vertex. If there is one edge
from one vertex to other then only this path can be
followed.
Selecting a Data Structure
●
●
●
Analyze the problem to determine the resource
constraints a solution must meet.
Determine the basic operations that must be
supported. Quantify the resource constraints
for each operation.
Select the data structure that best meets these
requirements.

More Related Content

PPTX
Introduction to Data Structures
PPTX
Introduction to Data Structures
PPTX
Data Structures - Lecture 2 [Introduction to Data Structures]
PPTX
Types Of Data Structure
PPTX
Introduction To Data Structures.
PPSX
Data Structure # vpmp polytechnic
PPTX
Introduction of data structures
PPTX
Data structures
Introduction to Data Structures
Introduction to Data Structures
Data Structures - Lecture 2 [Introduction to Data Structures]
Types Of Data Structure
Introduction To Data Structures.
Data Structure # vpmp polytechnic
Introduction of data structures
Data structures

What's hot (20)

PDF
L 15 ct1120
PPTX
1.introduction to data_structures
PPT
Data struters
PPTX
Introduction to data structures (ss)
PDF
Files and data storage
PPTX
PPTX
Types of datastructures
PPTX
Linear Data Structures - List, Stack and Queue
PPTX
Introduction to Data Structure part 1
PPTX
Data structure (basics)
PPTX
Advanced Trees
PPTX
Lecture 2 Data Structure Introduction
PPTX
Data structures slideshare
PPTX
Data structure(Part 2)
PPTX
Data structure unitfirst part1
PPTX
Dsa unit 1
PPTX
Types OF Data Structures
PPTX
Data structures Lecture no.3
PPTX
Data structures Lecture no. 2
L 15 ct1120
1.introduction to data_structures
Data struters
Introduction to data structures (ss)
Files and data storage
Types of datastructures
Linear Data Structures - List, Stack and Queue
Introduction to Data Structure part 1
Data structure (basics)
Advanced Trees
Lecture 2 Data Structure Introduction
Data structures slideshare
Data structure(Part 2)
Data structure unitfirst part1
Dsa unit 1
Types OF Data Structures
Data structures Lecture no.3
Data structures Lecture no. 2
Ad

Similar to Unit 1 Basic concepts to DS (20)

PDF
Introduction to data structure
PPTX
Classification of DS.pptx
PPT
Unit 1.ppt
PPT
Lecture 1 - Overview of Data Structure .ppt
PPTX
Basic terminology and concepts will be defined
PDF
Unit.1 Introduction to Data Structuresres
PPTX
Data structure
PDF
3130703dsgtudarshan Enotesallunits Darshan Institute Of Engineering Technology
PPT
data structure algorithm example and example
PPTX
DATA STRUCTURES and its classifications.pptx
PPTX
Data Structures and Algorithms Fundamentals
PPTX
Chapter 1 _edited.pptx.software engineering
PPTX
Chapter 1 _edited.pptx.software engineering
PPTX
data structures module I & II.pptx
PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
PPT
Data structure study material introduction
PPT
Data Structures and Algorithm for Engineers.ppt
PPT
DATA STRUCTURES IN INFORMATION TECHNOLOGY
PPT
DSA theory all topics (summary) presentation
Introduction to data structure
Classification of DS.pptx
Unit 1.ppt
Lecture 1 - Overview of Data Structure .ppt
Basic terminology and concepts will be defined
Unit.1 Introduction to Data Structuresres
Data structure
3130703dsgtudarshan Enotesallunits Darshan Institute Of Engineering Technology
data structure algorithm example and example
DATA STRUCTURES and its classifications.pptx
Data Structures and Algorithms Fundamentals
Chapter 1 _edited.pptx.software engineering
Chapter 1 _edited.pptx.software engineering
data structures module I & II.pptx
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
Data structure study material introduction
Data Structures and Algorithm for Engineers.ppt
DATA STRUCTURES IN INFORMATION TECHNOLOGY
DSA theory all topics (summary) presentation
Ad

More from LavanyaJ28 (16)

DOCX
Cs1301 syllabus
DOCX
Ds important questions
DOC
2 marks- DS using python
PPTX
Searching,sorting
PPTX
Hashing
PPT
Graphs
PPTX
Unit 3 trees
PPTX
Heap types & Trees
PPTX
Unit ii linear data structures
PPTX
Unit ii linear data structures
PPTX
Unit 2 application of stack
PPTX
Stack and queue
PPT
Unit 1 linked list
PPTX
Unit 1 array based implementation
PPTX
Unit 1 polynomial manipulation
PPTX
Unit 1 abstract data types
Cs1301 syllabus
Ds important questions
2 marks- DS using python
Searching,sorting
Hashing
Graphs
Unit 3 trees
Heap types & Trees
Unit ii linear data structures
Unit ii linear data structures
Unit 2 application of stack
Stack and queue
Unit 1 linked list
Unit 1 array based implementation
Unit 1 polynomial manipulation
Unit 1 abstract data types

Recently uploaded (20)

PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Construction Project Organization Group 2.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Digital Logic Computer Design lecture notes
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Construction Project Organization Group 2.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Foundation to blockchain - A guide to Blockchain Tech
Embodied AI: Ushering in the Next Era of Intelligent Systems
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
CYBER-CRIMES AND SECURITY A guide to understanding
additive manufacturing of ss316l using mig welding
R24 SURVEYING LAB MANUAL for civil enggi
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Model Code of Practice - Construction Work - 21102022 .pdf
Lecture Notes Electrical Wiring System Components
Digital Logic Computer Design lecture notes
Operating System & Kernel Study Guide-1 - converted.pdf

Unit 1 Basic concepts to DS

  • 1. INTRODUCTION TO DATA STRUCTURES CS1301 DATA STRUCTURES USING PYTHON UNIT-1 LINEAR DATA STRUCTURES
  • 2. Basic Terminologies zaid shabbir Data Structure Data: are simply a value are set of values of different type which is called data types like string, integer, char etc. Structure: Way of organizing information, so that it is easier to use In simple words : Its a way organizing data in such a way so that data can be easier to use.
  • 3. What is Data structure? • It is a format for storing data in an organized manner. • A logical way of storing data and it also define mechanism of retrieve data • Abstract way to organize information.
  • 4. Why do we need Data structures? • Human requirement with computer are going to complex day by day. To solve the complex requirements in efficient way we need this study. • It is a method/ technique for storing and organizing the information in a computing machine. • Since it is all organized and well maintained, storage is properly taken care of and the data being searched for can be retrieved very easily and f
  • 5. • Generally classified as: 1. Primitive:- Primitive data types are predefined types of data, which are supported by the programming language. For example, integer, character, and string are all primitive data types. 2. Non Primitive :-Not defined by the programming language, but are instead created by the programmer.
  • 7. Operation on Linear/Non-Linear Data Structure ● ● ● ● ● Add an element Delete an element Traverse / Display Sort the list of elements Search for a data element
  • 8. Types of Data Structure Array: • An array is defined as it is a collection of items stored at contiguous memory locations. • Arrays are the set of homogeneous data elements stored in RAM, therefore, it can hold only one type of data.
  • 9. Pros: Fast Access Memory consumption is minimal Cons: Insertion and deletion is complicated
  • 10. Types of Data Structure ... Stack: A stack is a data structure in which items can be inserted only from one end and get items back from the same end. There , the last item inserted into stack, is the the first item to be taken out from the stack. In short its also called Last in First out [LIFO]. zaid shabbir
  • 11. • Operations performed here: Push :- add a element in stack Pop :- remove an element in stack • ADVANTAGES 1. Easy to started 2. Less Hardware Requirement 3. Cross- Platform • DIS ADVANTAGES 1. not flexible 2. Lack of scailability
  • 12. Types of Data Structure ... QUEUE: A queue is two ended data structure in which items can be inserted from one end and taken out from other end. Therefore , the first item inserted into queue is the first item to be taken out from the queue. This property is called First in First out [FIFO]. zaid shabbir
  • 13. • Operations performed here: Enqueue:- add a element in queue Dequeue :- remove an element in queue • Pros: 1. Being able to handle multiple data types 2. Flexibility and fast. • Cons: 1. A new element can only be inserted when all of the elements are deleted from the queue.
  • 14. Types of Data Structure ... Linked List: In linked list space to store items is created as is needed and destroyed when space no longer required to store items. It is a linear collection of data elements. It has two parts: 1.Info :- gives information 2. other’s link part.- gives other node’s address Hence linked list is a dynamic data structure.
  • 15. • Operations performed in Linked list Traversing Searching Insertion Deletion • Pros: 1. You can also decrease and increase the linked list at run-time. 2. Memory is well utilized in the linked list. Because in it, we do not have to allocate memory in advance. 3. Its access time is very fast, and it can be accessed at a certain time without memory overhead. • Cons 1. The linked list requires more memory to store the elements than an array, because each node of the linked list points a pointer, due to which it requires more memory. 2. It is very difficult to traverse the nodes in a linked list.
  • 16. Types of Data Structure ... • Tree: Non-linear data structure which is mainly used to represent data containing a hierarchical relationship between elements • The data structure which reflects this relationship is called tree.
  • 17. • Operations 1. Traversing 2. Searching 3. Insertion a 4. Deletion • Pros: 1. It provides an efficient insertion and searching operations. 2. Trees are flexible. • Cons: 1. A small change in the data can cause a large change in the structure of the decision tree causing instability 2. It is relatively expensive as the complexity and time has taken are more.
  • 18. Types of Data Structure ... Graph: Data sometimes contain a relationship between pairs of elements which is not necessarily hierarchical in nature. For example, an airline flies only between cities connected by lines. It is a set of items connected by edges. Each item is called a vertex or node.
  • 19. • Trees are just like a special kinds of graphs. Graphs are usually represented by G = (V, E), where V is the set vertices and E is the set of Edges. • Operations Performed: • Searching • Insertion • deletion
  • 20. Types of Data Structure ... Undirected Graph: A graph whose edges are unordered pair of vertices. That is each edge connects two vertices. In an undirected graph, direction is not important, if the path is available, it can be traversed in any direction. zaid shabbir
  • 21. Types of Data Structure ... Directed Graph: In directed graph a directional edge connect two node/vertex. If there is one edge from one vertex to other then only this path can be followed.
  • 22. Selecting a Data Structure ● ● ● Analyze the problem to determine the resource constraints a solution must meet. Determine the basic operations that must be supported. Quantify the resource constraints for each operation. Select the data structure that best meets these requirements.