0% found this document useful (0 votes)
88 views12 pages

Abhijit Kumar DSA

Uploaded by

arijit.ghosal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views12 pages

Abhijit Kumar DSA

Uploaded by

arijit.ghosal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Types of Data Structures

St. Thomas College of Engineering and Technology


Name : Abhijit Kumar
Dept. : Information Technology
Subject : Data Structure and Algorithm
Sub. Code : (PCC-CS301)
Class Roll No : 36
University Registration No : 241220110336
Uni. Roll No. : 12200224003
Date of Creation : 05/07/2025
What is a Data Structure?

 A data structure is a way to organize and store data in a


computer.
 It enables efficient access and modification of data.
 Used in software development and algorithms
 It helps in efficient data access, processing, and modification.
 Common examples: Arrays, Linked Lists, Stacks, Queues, Trees,
Graphs.
 Choosing the right data structure improves program
performance.
 Used in real-world apps like search engines, social media,
databases.
Classification of Data
Structures

 1. Primitive Data Structures


 2. Non-Primitive Data Structures
 a. Linear Data Structures
 b. Non-Linear Data Structures
Primitive Data Structures

 Basic building blocks of data handling in


programming.
 Directly operated by the machine's instructions.
 Examples:
 Integer (int) – stores whole numbers.
 Float – stores decimal numbers.
 Character (char) – stores single letters or symbols.
 Boolean – stores true or false values.
 Simple and fast, used to create more complex data
structures.
Linear Data Structures

 Data is arranged in a sequential (linear) order.


 Every element has a unique predecessor and
successor, except the first and last.
 Easy to implement and traverse.
 Common types:
 Array – fixed size, fast access using index.
 Linked List – dynamic size, elements linked by pointers.
 Stack – LIFO (Last In, First Out).
 Queue – FIFO (First In, First Out).
 Used in memory management, scheduling, and
searching.
Arrays

 A collection of elements stored in contiguous


memory locations.
 All elements are of the same data type.
 Accessed using index, starting from 0.
 Fixed-size collection of elements of same type.
 Fast for accessing data, slow for inserting/deleting.
 Used in loops, searching, sorting, and storing data
lists.
Linked Lists

 Collection of nodes, where each node points to


next.
 Dynamic size, efficient insertions/deletions.
 Types: Singly, Doubly, Circular Linked Lists.
 Each node has:
 Data – the value stored.
 Pointer – address of the next node.
 Good for insertion/deletion; slower access than
arrays.
Stacks and Queues

 Stacks: LIFO (Last In, First Out) structure.


 Elements added and removed from top.
 Used in function calls, undo operations, expression
evaluation.
 Queues: FIFO (First In, First Out) structure.
 Elements added at rear, removed from front.
 Used in recursion, scheduling, memory
management.
Non-Linear Data Structures

 Data is not stored sequentially like in linear


structures.
 Elements can be connected in hierarchical or
networked ways.
 No unique predecessor or successor for elements.
 Common types:
 Tree – data arranged in parent-child hierarchy.
 Graph – data connected via nodes and edges.
Trees Data Structure

Bullet Points:
 Hierarchical data structure with a root node.
 Each node can have child nodes (branches).
 Binary Tree: each node has at most 2 children.
 Common types: Binary Tree, Binary Search Tree
(BST), AVL Tree, B-Trees.
 Used in databases, file systems, and decision-
making.
 Efficient for searching, insertion, and deletion.
Graph Data Structure :

 Bullet Points:
 Graph is a set of nodes (vertices) connected by edges.
 Can be directed (one-way) or undirected (two-way).
 Types: Weighted, Unweighted, Cyclic, Acyclic.
 Represented using adjacency matrix or adjacency list.
 Used in networks: social media, GPS, internet routing,
etc.
Conclusion

 Different types suit different applications.


 Choosing the right data structure is crucial.
 Efficiency and performance depend on structure
used.

You might also like