Data Structures Notes
Subject Overview
Data Structures builds internal data management skills — algorithm complexity and searching/
Subject at a glance
4
Units
23
Topics
4
Credits
4
Infographics
Unit-wise Syllabus
4 units — open any unit for detailed topic-wise notes, diagrams and important exam questions
- Basic concept of data
- problem analysis
- algorithm complexity
- Big O notation
- time-space trade-off
- types of data structures (arrays, records, pointers, stack, queue, trees, linked list)
- linear and binary search
- bubble/insertion/selection sort
Linear search
O(1)
O(n)
Binary search (sorted)
O(1)
O(log n)
Bubble sort
O(n)
O(n²)
Insertion sort
O(n)
O(n²)
Selection sort
O(n²)
O(n²)
Study guide
This unit introduces data structures, problem analysis, algorithm complexity, Big O notation, the time-space trade-off, the main types of structure, linear and binary search and bubble, insertion and selection sort. Compute the complexity of each sorting algorithm.
- Basics of stacks and queues
- recursion
- Polish notation
- circular queues
- priority queues
Order
LIFO: last in, first out
FIFO: first in, first out
Operations
push, pop
enqueue, dequeue
Access point
One end (top)
Two ends (front and rear)
Uses
Recursion, undo, expression evaluation
Printing, scheduling, buffering
Study guide
You study stacks and queues, recursion, Polish notation, circular queues and priority queues. Practise converting infix to postfix expressions.
- Single linked list
- circular linked list
- doubly linked list
- dynamic storage management
- generalized list
- garbage collection
Singly linked
Next pointer only
Simple, less memory
Doubly linked
Next and previous pointers
Move both ways, easy deletion
Circular
Last node points to the first
Round-robin traversal
Study guide
You study singly, circular and doubly linked lists, dynamic storage management, generalised lists and garbage collection. Draw nodes and pointers for every operation.
- Definition and concepts
- basic trees
- binary tree representations
- binary tree traversals and applications of trees
- Inorder
- Left, Root, Right: gives sorted order in a BST
- Preorder
- Root, Left, Right: copies a tree
- Postorder
- Left, Right, Root: deletes a tree
- Level order
- Level by level, using a queue
Study guide
You study trees: definitions, binary tree representations, traversals and applications. Practise the three traversals on a sample tree.
Why Data Structures Matters
Data structures are the single most important topic in coding interviews and underlie databases, operating systems and every efficient program.
How to Prepare for Data Structures
- Implement each structure yourself at least once.
- Draw diagrams before coding any pointer operation.
- Memorise the time complexity of every operation and sort.
Data Structures: Frequently Asked Questions
What is Big O notation?
Big O notation describes how an algorithm's running time or space grows with the size of the input, focusing on the worst case.
What is the difference between a linked list and an array?
An array has fixed-size contiguous storage with fast indexed access, while a linked list uses nodes connected by pointers, making insertion and deletion easy.
