Data Structure
Subject Name: Data Structures
Subject Code: BE03000081
Semester: 3 (Bachelor of Engineering – GTU)
Unit: Section 1 – Introduction to Data Structures
Prepared by: Prof. RR Keshwala
Academic Year: 2025–2026
Section 1: INTRODUCTION TO DATA STRUCTURES: Basic Terminology, Classification of Data Structure
Primitive and Non Primitive Data Structure, Linear and Non-Linear Data Structures, Examples of Primitive
and Non Primitive Data Structures, storage representation of Primitive and Non Primitive Data Structures
Learning Objectives
At the end of this section, we will be able to:
Understand key terminology used in Data Structures
Classify Data Structures as Primitive and Non-Primitive
Differentiate between Linear and Non-Linear Data Structures
Identify Static and Dynamic Data Structures
Visualize memory representation of common data structures
Recognize real-world applications of various data structures
What is a Data Structure?
A data structure is a method of organizing and storing data in a computer so that it can be used
efficiently for processing, retrieval, updating, and deletion.
In simpler terms:
"Data Structures are containers that organize data in different ways depending on what we want
to do with that data."
• A Data Structure is a specialized format for organizing, storing, and managing data in a computer
so that it can be used efficiently. Data structures define the relationship between the data, the
operations that can be performed on the data, and how the data is stored in memory.
• More formally: “A data structure is a logical and mathematical model that describes how data
is stored, accessed, and modified in a computer program.”
• Every computer program processes data in one form or another. If the data is not organized
properly, even a simple task like searching for an item or sorting values can become time-
consuming and inefficient.
• Just like a cabinet organizes files into drawers and folders for easy access, data structures
organize digital data to make operations like searching, sorting, inserting, and deleting faster
and more efficient.
Formal Characteristics of a Data Structure
• It defines how data is grouped and connected
• It specifies what operations (insert, delete, traverse) can be performed
• It governs how the data is stored in memory (contiguous or scattered)
• It plays a vital role in how fast and efficiently a program executes
P a g e 1 | 18
Data Structure
Key Components of a Data Structure
1. Data – actual values stored
2. Storage representation – how and where the data is stored
3. Operations – what we can do with the data:
o Insert
o Delete
o Search
o Traverse
o Sort
4. Access methods – direct (index), sequential (loop), recursive
Why Do We Need Data Structures?
Imagine the following situations:
Without DS:
• You store 1000 student names in separate variables: name1, name2, ..., name1000
• You manually loop through them to search for one name
• You don’t know how much memory you’ll need in advance
This is inefficient, error-prone, and time-consuming.
With DS:
• You use an array to store names
• You use a search algorithm like binary search
• You can sort, insert, or delete entries logically
Thus, data structures bring efficiency, clarity, and organization to programs.
Real-Life Analogies & Examples
Here are some daily life situations that reflect the concept of data structures:
Scenario Data Structure Why it fits
Books on a shelf Array Fixed number of books placed in a row
Undo button in MS Word Stack Last action is undone first (LIFO)
Line at a railway counter Queue First person in line is served first (FIFO)
Family tree Tree Hierarchical relationship between
generations
Google Maps navigation Graph Locations are nodes, roads are edges
Phone contact search Hash Table / BST Fast look-up using names
Music Playlist (Next/Previous) Doubly Linked Traverse forward or backward easily
List
CPU Task Scheduling Priority Queue Tasks with higher priority get CPU time
first
File system (folders within Tree Parent-child folder relationships
folders)
P a g e 2 | 18
Data Structure
Example in Code (C):
Let’s say you want to store 5 integers:
Without DS:
int a = 10, b = 20, c = 30, d = 40, e = 50;
This is hard to manage if size grows.
With DS (Array):
int arr[5] = {10, 20, 30, 40, 50};
Now you can:
• Access: arr[2] → 30
• Loop through all elements
• Perform sorting, searching, etc.
“If data is the fuel of computation, data structures are the pipelines that make computation
efficient.”
Key Characteristics of a Good Data Structure:
• Efficient memory use
• Fast access to data
• Ease of performing operations (e.g., insertion, deletion, traversal)
• Adaptability for different types of problems
Data structures serve as the foundation of algorithms and program design, and they are
indispensable in building complex software such as operating systems, databases, AI systems, and
compilers.
Real-World Examples of Data Structures
Scenario Associated Data Structure Why it fits
Undo/Redo in Word or Stack (LIFO) Last action is undone first
Photoshop
Browser history Stack Last visited page is on top
Customer line in a bank Queue (FIFO) First come, first served
Google Maps route search Graph Locations as nodes, roads as edges
Contacts search in mobile Binary Search Tree or Hash Fast searching
Table
Playlist of songs Linked List Easy addition/removal of songs
CPU Job Scheduling Priority Queue Jobs executed based on priority
Family tree representation Tree Hierarchical relationship
P a g e 3 | 18
Data Structure
Social network friend Graph Users as nodes, relationships as
suggestion edges
Phone keypad autocomplete Trie Efficient word searching & prefix-
matching
These real-life analogies help students visualize abstract data structures and understand their
practical utility.
Why Should We Learn Data Structures?
Learning data structures is essential for several reasons:
1. Efficiency in Coding
Choosing the right data structure can reduce execution time and memory usage significantly.
Example:
Using an array instead of a linked list may save memory but will make insertion/deletion slower.
2. Problem Solving
Different problems require different approaches. The ability to choose and implement the right data
structure is key to solving problems effectively.
Example:
Dijkstra's algorithm uses priority queues and graphs for finding shortest paths.
3. Foundation of Algorithms
All major algorithms depend on specific data structures — sorting uses arrays/lists, recursion uses
stack, pathfinding uses graphs, etc.
4. Industry Relevance
Whether it's a software developer, game designer, or data analyst, every professional needs to
understand data structures to build scalable, optimized applications.
5. Placement & Competitive Programming
Data structure mastery is critical in cracking coding rounds in interviews (Amazon, Google, etc.) and
online contests (Codeforces, LeetCode, etc.).
Basic Terminology
Term Detailed Explanation Example
Data A raw value or fact that may or may not 5, "apple", True
have meaning
Data Item A single unit of value 42, 'A', 3.14
Group Item A collection of related data items Student = {Name, Roll No, Marks}
Data A logical model for organizing data for Array, Stack, Linked List
Structure (DS) efficient access and modification
Operation Actions that can be performed on a Insert, Delete, Search, Traverse
data structure
Storage Actual memory layout of a data Array: contiguous memory; Linked List:
Structure structure (static or dynamic) scattered memory with pointers
Field A single attribute of a record Name in a student record
Record A complete collection of fields Student Record = {Name, Roll, Grade}
File A collection of related records File of student records stored in
memory
P a g e 4 | 18
Data Structure
Example in C:
struct Student {
int roll;
char name[20];
float marks;
};
In this, roll, name, and marks are fields, the Student structure is a record, and multiple such records
form a file.
Key Takeaways
• Data Structure is the foundation of efficient coding
• It defines how we store and access data — not just what data we store
• Picking the right data structure often makes the difference between a fast and a slow
program
• It is essential in programming, software development, interviews, system design, and
research
Classification of Data Structures
1. Classification Based on Data Type: Primitive vs. Non-Primitive
Data structures can first be classified by the type of data they represent and manage. These fall
under two main categories:
A. Primitive Data Structures
Primitive data structures are the basic building blocks provided directly by programming languages.
They represent atomic, single-value data types and are simple to use.
Examples:
• int – stores integer numbers
• char – stores a single character
• float – stores decimal values
• bool – stores True/False
• pointer – stores memory addresses (used in dynamic DS)
P a g e 5 | 18
Data Structure
Use Case:
Used when we need to store a single value or variable.
C Example:
int age = 21;
char grade = 'A';
float marks = 84.5;
B. Non-Primitive Data Structures
Non-primitive data structures are user-defined or derived structures that organize multiple values
efficiently. These can hold collections of data and are designed for manipulation, searching, sorting,
and organizing.
They can be:
• Linear: Array, Stack, Queue, Linked List
• Non-Linear: Tree, Graph, Heap, Trie
Examples:
• Array of integers → int arr[5] = {1, 2, 3, 4, 5};
• Linked list of student records
• Tree representing folder hierarchy
Real-Life Analogy
Analogy Primitive Non-Primitive
Bricks vs Wall Bricks (basic blocks) Wall (organized structure)
Single book vs Library A book (title, author) A library (organized shelves)
Single chair vs Classroom A chair (unit) A classroom full of organized chairs
Key Differences Table
Feature Primitive Non-Primitive
Provided by Programming language Programmer-defined
Type Single, atomic value Group or collection of values
Structure Simple Structured, organized
Examples int, char, float, bool Array, Stack, Queue, Tree, Graph
Memory Use Fixed Can be dynamic
Flexibility Low High (can grow/shrink)
• We often think arrays are primitive — but arrays store primitive values, they are non-
primitive themselves because they organize multiple items.
Summary:
• Primitive: Basic data types (indivisible units)
• Non-Primitive: More complex, structured types built on primitive types
• Goal: Use non-primitive structures to efficiently store, access, and manipulate data
collections
P a g e 6 | 18
Data Structure
2. Classification Based on Structure: Linear vs. Non-Linear Data Structures
Data Structures can also be categorized based on how their elements are arranged — either
sequentially (linear) or hierarchically (non-linear). This classification is essential for selecting the
right structure depending on the type of problem you're solving.
A. Linear Data Structures
In linear data structures, elements are arranged in a sequential manner, i.e., one after another.
Every element has a unique predecessor and successor, except the first and last elements.
Key Features:
• Single level data layout
• Easy to implement and traverse
• Memory can be contiguous or linked
• Mostly used for simple data processing
Real-Life Analogies:
Real-World Case Linear DS Representation
Books on a shelf Array – arranged in order
People in a queue Queue – first in, first out
Undo operations Stack – last action undone first
Playlist of songs Linked List – you can skip, insert, or remove songs
Examples:
• Array: int arr[5] = {1, 2, 3, 4, 5};
• Stack: LIFO – Push, Pop
• Queue: FIFO – Enqueue, Dequeue
• Linked List: Nodes connected using pointers
B. Non-Linear Data Structures
In non-linear data structures, elements are arranged hierarchically or in a graph-like fashion. Here, a
single element can be connected to multiple elements, and relationships can be complex or
branching.
Key Features:
• Data items may not be traversed in a single run
• Suitable for representing hierarchical and complex data relationships
P a g e 7 | 18
Data Structure
• Operations may involve recursion or backtracking
• Usually requires dynamic memory
Real-Life Analogies:
Real-World Case Non-Linear DS Representation
Family tree Tree – parent-child hierarchy
Road map Graph – cities as nodes, roads as edges
Folder system on a PC Tree – folders and subfolders
Social media network Graph – people as nodes, relationships as edges
Examples:
• Tree: Binary Tree, Binary Search Tree, Heap
• Graph: Directed, Undirected, Weighted
• Trie: For efficient word searching (used in autocomplete)
Comparison Table
Feature Linear DS Non-Linear DS
Layout Sequential Hierarchical or graph-based
Traversal One path from start to end Multiple paths possible
Memory Often contiguous or linked Mostly dynamic and pointer-based
Relationship One-to-one (prev-next) One-to-many or many-to-many
Examples Array, Stack, Queue, Linked Tree, Graph, Trie
List
Real-world Examples Bookshelf, Queue, Undo Family tree, Google Maps, Social
Stack Network
Visual Diagram
Linear:
[10] -> [20] -> [30] -> [40]
Non-Linear (Tree):
10
/ \
20 30
/ \
40 50
P a g e 8 | 18
Data Structure
Summary:
• Use linear data structures when data is simple, and you need to process it in order (like
queues or lists).
• Use non-linear data structures when relationships are complex, and hierarchy or
connectivity is involved (like trees or graphs).
3. Classification Based on Memory Behavior: Static vs. Dynamic Data Structures
Another key classification of data structures is based on how memory is allocated — whether at
compile time (static) or runtime (dynamic). This impacts flexibility, memory efficiency, and suitability
for different problems.
A. Static Data Structures
In static data structures, memory is allocated at compile time, and the size of the structure is fixed
and predefined. This makes them simple and fast but less flexible, as the size cannot be changed
during execution.
Key Characteristics:
• Fixed size
• Easier to implement
• Wastes memory if not fully used
• Can cause overflow if size is underestimated
Examples:
• Array: int arr[100];
• Static Stack: Stack using array
• Static Queue: Queue using array
Real-Life Analogy:
• Booking a fixed number of seats in a hall whether you need them all or not
C Code Example:
int marks[5]; // fixed array of 5 integers
Limitations:
• You cannot add a 6th element unless the array is resized manually (which often requires
creating a new one).
B. Dynamic Data Structures
In dynamic data structures, memory is allocated at runtime. These structures can grow or shrink in
size as needed. They are implemented using pointers and dynamic memory allocation functions like
malloc(), calloc() in C.
Key Characteristics:
• Memory is flexible
• Efficient usage – allocate only what is needed
• Slightly more complex to manage (needs free() to deallocate)
• Preferred for large or variable-size data
Examples:
• Linked List: Each node created when needed
• Dynamic Stack/Queue: Implemented using linked lists
P a g e 9 | 18
Data Structure
• Trees and Graphs: Nodes created and connected dynamically
•
Real-Life Analogy:
• Ordering chairs one by one for guests as they arrive — no wastage, and you never run out
C Code Example:
struct Node {
int data;
struct Node* next;
};
struct Node* head = (struct Node*) malloc(sizeof(struct Node));
Advantages:
• Adapts to variable input sizes
• Avoids memory wastage
Drawbacks:
• Requires more careful memory management (risk of memory leaks if not freed properly)
Comparison Table: Static vs. Dynamic
Feature Static DS Dynamic DS
Memory Compile-time Run-time
Allocation
Size Fixed Flexible
Speed Faster access (due to contiguous Slightly slower (non-contiguous
memory) memory)
Implementation Arrays, Static Stack, Static Queue Linked List, Trees, Graphs
Memory Efficiency May waste space Efficient and adaptable
Ease of Use Easier More complex (pointers required)
Diagrammatic Representation:
Static Array (Contiguous Memory):
Index: 0 1 2 3 4
Memory: [5] [9] [3] [1] [0]
Dynamic Linked List (Non-Contiguous Memory):
[5 | *] ---> [9 | *] ---> [3 | *] ---> NULL
(Each node stores data and pointer to next)
Summary:
• Use static structures when data size is known and fixed.
• Use dynamic structures when data size is variable or large.
• Most real-world applications use dynamic structures for scalability and flexibility.
P a g e 10 | 18
Data Structure
Flowchart: Classification of Data Structures
Below is a hierarchical flowchart that brings together all classifications discussed:
Summary Table: Classification of Data Structures
Classification Type Sub-Type / Key Features Real-Life Analogy
Examples
By Data Type Primitive int, float, char, bool Basic, atomic types A single book or
brick
Non- Array, Stack, Tree, Collection of data Library, bookshelf
Primitive Graph
By Structure Linear Array, Stack, Queue, Sequential layout Train coaches,
Linked List queue
Non-Linear Tree, Graph, Heap Hierarchical or Family tree,
networked Google Maps
By Memory Static Array, Static Stack Fixed size at Pre-booked hall
Allocation compile time
Dynamic Linked List, Tree Flexible size at Expandable queue
runtime line
Quick Takeaways:
• All data in a computer needs to be structured efficiently for performance.
• Choosing the right data structure is essential depending on:
o Data type
o Data relationship (linear/non-linear)
o Memory needs (fixed/dynamic)
P a g e 11 | 18
Data Structure
Storage Representation of Primitive and Non-Primitive Data Structures
What It Means
Storage representation refers to how data is stored in memory — whether it's a simple value like an
integer, or a complex structure like a tree or graph.
Understanding storage representation helps in:
• Efficient memory usage
• Fast data access
• Designing scalable applications
1. Storage Representation of Primitive Data Structures
Primitive data types include:
int, float, char, bool, double
These are atomic (single unit) data types, and the compiler directly stores them in contiguous
memory locations using a fixed number of bytes.
How They Are Stored:
Data Type Typical Size (32-bit system) Example
int 4 bytes int x = 5;
char 1 byte char ch = 'A';
float 4 bytes float pi = 3.14;
bool 1 byte bool status = true;
Example:
int x = 25;
Memory: [1000] = 25
So, x is stored at memory address 1000 with a size of 4 bytes.
2. Storage Representation of Non-Primitive Data Structures
Non-primitive data structures are more complex — they store multiple values and are either
contiguous or non-contiguous in memory.
A. Array (Contiguous Memory)
• All elements are stored next to each other in memory.
• Access is fast because the address is calculated using an index formula.
Address Formula:
Address of arr[i] = base address + (i × size of each element)
Example:
int arr[4] = {10, 20, 30, 40}; // int = 4 bytes
Assume base address = 1000
Index Value Memory Address
0 10 1000
1 20 1004
2 30 1008
3 40 1012
P a g e 12 | 18
Data Structure
B. Linked List (Non-Contiguous Memory)
• Each element (called a node) is created at runtime.
• A node stores: data + pointer to the next node.
Node Structure in C:
struct Node {
int data;
struct Node* next;
};
Example:
Memory:
[1000] → [10 | 1200]
[1200] → [20 | 1500]
[1500] → [30 | NULL]
Here:
• Data is scattered in memory
• Pointers connect the nodes logically
Access is slower, but insertion and deletion are more flexible than in arrays.
C. Stack and Queue
1. Array-based Implementation (Contiguous)
int stack[5];
• Stored like arrays
• Fixed size, fast access
2. Linked List Implementation (Non-Contiguous)
• Each node created dynamically
• Flexible size
D. Tree and Graph (Pointer-based)
Each node contains:
• Data
• Pointers to children or neighbors
Tree Example:
struct TreeNode {
int data;
struct TreeNode* left;
struct TreeNode* right;
P a g e 13 | 18
Data Structure
};
[1000]
10
/ \
[1100] [1200]
20 30
Graph Representation:
1. Adjacency Matrix (2D array) – O(V²) space
2. Adjacency List (linked list of edges) – O(V + E) space
Summary Table
Structure Storage Memory Type Access Speed Flexibility
Primitive Direct Contiguous Fast (O(1)) Fixed size
Array Contiguous Contiguous Fast (O(1)) Limited
Linked List Nodes Scattered Slower (O(n)) High
Stack (array) Array Contiguous Fast (O(1)) Fixed
Stack (linked) Nodes Scattered Moderate Dynamic
Tree / Graph Pointers Scattered Depends on logic Dynamic
Key Takeaways:
• Primitive types are simple and stored directly.
• Arrays are fast but fixed and need contiguous memory.
• Linked Lists, Trees, and Graphs are dynamic and stored using pointers.
• Storage representation directly affects speed, memory usage, and suitability of a data
structure.
Abstract Data Structure (Abstract Data Type - ADT)
Definition:
An Abstract Data Structure, more formally known as an Abstract Data Type (ADT), is a logical
description of how data behaves and what operations are allowed — without specifying how it is
implemented internally.
It focuses on what operations can be performed rather than how those operations are carried
out.
In Simple Terms:
“An ADT defines a data model and allowed operations — it hides the actual implementation details.”
It’s like using a remote control — you press buttons (operations) without knowing the internal
circuits (implementation).
Key Properties of an ADT:
• Encapsulation: Only certain operations are allowed.
• Implementation-independent: User doesn’t need to know internal details.
• Defined behavior: You know exactly what happens when you use an operation.
P a g e 14 | 18
Data Structure
Examples of ADT in Computer Science:
ADT Allowed Operations
Stack push(x), pop(), peek(), isEmpty()
Queue enqueue(x), dequeue(), front(), isEmpty()
List insert(pos, val), delete(pos), search(val)
Map (Dictionary) put(key, val), get(key), remove(key)
Set add(val), remove(val), contains(val)
Real-Life Analogies of Abstract Data Structures:
ATM Machine → Queue / Map ADT
• You insert your card and enter a PIN → ATM processes you like an entry in a queue.
• You can withdraw, check balance, or deposit → These are defined operations.
But you don’t know:
• How it fetches your balance internally
• How transactions are recorded in DB
Conclusion:
An abstract data structure (ADT) is a conceptual model that defines:
• What operations can be performed on data
• What behavior is expected
• But hides how the data and operations are implemented internally
This separation of interface and implementation helps in writing modular, reusable, and
maintainable code — and it is the backbone of object-oriented programming and data structure
design.
Relationship Between Data Structure (DS) and Abstract Data Type (ADT)
1. ADT is a Concept, DS is its Implementation
• ADT defines the behavior and operations — what you can do.
• DS defines the structure and memory layout — how it’s done.
Think of ADT as the blueprint and Data Structure as the building constructed from that blueprint.
2. ADT provides the Interface; DS provides the Backend
Concept ADT DS
Level Logical / Abstract Physical / Concrete
Role Specifies allowed operations Implements those operations
Focus What the data type does How it does it
Example Stack: push(), pop(), peek() Implemented using array or linked list
Example: Stack
Stack ADT says:
• You can push(x), pop(), peek(), isEmpty()
P a g e 15 | 18
Data Structure
• It behaves as Last In First Out (LIFO)
But it doesn’t say how!
You can implement it using:
• Array → Fixed-size stack with contiguous memory
• Linked List → Dynamic-size stack using pointers
Hierarchy of Abstraction:
Abstract Data Type (ADT)
↓
Logical Description
↓
Data Structure (Implementation)
↓
C/C++/Java Code
Analogy:
Imagine you’re designing a coffee machine.
• The buttons on the interface (select coffee, add sugar, dispense) = ADT
• The pipes, boiler, grinder inside = Data Structures (and logic)
Why This Matters:
• As a programmer, you think in terms of ADTs — Stack, Queue, List, Tree, etc.
• As an engineer, you choose the best DS implementation based on:
o Speed
o Memory
o Scalability
Understanding this relationship helps you design better systems, optimize performance, and write
cleaner code.
1. Time Complexity
Definition:
Time Complexity is the measure of how much time an algorithm takes to run as a function of the
input size n.
It helps us understand how the performance of an algorithm scales when the input grows.
Why It Matters in DS?
• You can choose the most efficient algorithm or data structure.
• Helps avoid slowdowns and bottlenecks in large applications.
Common Time Complexities:
Notation Description Example
O(1) Constant time Accessing arr[i]
O(log n) Logarithmic time Binary Search
O(n) Linear time Traversing an array
O(n log n) Log-linear time Merge Sort
O(n²) Quadratic time Bubble Sort
P a g e 16 | 18
Data Structure
O(2ⁿ) Exponential time Recursive Fibonacci
Real-Life Analogy:
Imagine searching for a friend’s name:
• O(1): Friend is sitting right in front of you.
• O(n): You check each person one by one.
• O(log n): You split a row in half each time (binary search).
Example in Data Structures:
Operation Data Structure Time Complexity
Search Array (unsorted) O(n)
Search Binary Search Tree (balanced) O(log n)
Insert Stack or Queue O(1)
Delete Linked List (by value) O(n)
Access Hash Table O(1) average, O(n) worst
2. Space Complexity
Definition:
Space Complexity is the measure of how much extra memory an algorithm or data structure needs,
in addition to the input.
It includes memory used for:
• Variables
• Data structures
• Recursion stack
• Temporary storage
Common Space Complexities:
Notation Description Example
O(1) Constant space Swapping variables
O(n) Linear space Storing an array of size n
O(n²) Quadratic space 2D matrix storage
Real-Life Analogy:
Packing for a trip:
• A light packer (O(1)) takes only essentials.
• A moderate packer (O(n)) takes one bag per day.
• A heavy packer (O(n²)) takes combinations of outfits for each day!
Example in Data Structures:
Algorithm Extra Space Used Space Complexity
Bubble Sort No extra space O(1)
Merge Sort Temporary arrays O(n)
Recursive DFS Call stack O(h) where h = height of tree
Storing Graph (Adjacency Matrix) O(V²) Space for V×V matrix
P a g e 17 | 18
Data Structure
Storing Graph (Adjacency List) O(V+E) Space for nodes & edges
Why This Is Useful in DS
• Guides selection of the right data structure:
o Want fast access? → Use Hash Table (O(1) time)
o Want memory-efficient tree? → Use Binary Tree instead of 2D arrays
• Helps you design programs that are:
o Fast for large inputs
o Scalable for real-world applications
• Essential in interviews and competitive coding
Summary Table
Metric Measures Affects Example
Time Complexity Execution time Speed O(n), O(log n), O(n²)
Space Complexity Memory usage Efficiency & scalability O(1), O(n), O(n²)
Short Answer Questions
1. Explain the need for data structures with an example.
2. What is the difference between primitive and non-primitive data structures?
3. List and explain operations on data structures.
4. Write a short note on Abstract Data Types with one real-life example.
5. How are arrays stored in memory? Illustrate with a diagram.
6. Differentiate between linear and non-linear data structures.
7. Explain the classification of data structures based on memory allocation.
8. Explain how a linked list is stored in memory with a diagram.
9. Explain the importance of time complexity in data structure selection.
10. What is the relationship between ADT and DS?
Long Answer / Descriptive Questions
1. Define Data Structure. Explain its types with examples and diagrams.
2. Describe Abstract Data Types. Explain Stack ADT and Queue ADT with operations.
3. Classify data structures based on (a) Data Type, (b) Structure, and (c) Memory Behavior with
examples.
4. Explain static and dynamic data structures with real-world analogies.
5. Describe the storage representation of arrays and linked lists in memory.
6. Discuss the concept of time and space complexity with examples from sorting/searching.
7. Compare different data structures (array, stack, queue, linked list, tree, graph) based on
access, memory, and use case.
8. Describe various real-life scenarios and the data structures best suited for them.
P a g e 18 | 18