Exam Prep Guide
Data Structures & Algorithms Exam Prep
A topic-by-topic guide to what's actually covered in Data Structures & Algorithms, how to prepare for it properly, and the mistakes that cost students the most marks.
What's Typically Covered
Introduction & Algorithm Analysis
- Intro to Data Structures
- Big O, Big Theta, Big Omega
- Arrays
Search Algorithms
- Linear Search
- Binary Search
Sorting I
- Insertion Sort
- Merge Sort
Sorting II
- Quick Sort
Linked Lists
- Singly Linked List
- Doubly Linked List
- Circular Linked List
Linked Lists Operations
- Search
- Sort
Stacks
- Implementation Using Array
- Implementation Using Linked List
Stacks Applications
- Polish Notation
- Reverse Polish Notation
Queues
- Singly Queue
- Deque
- Circular Queue
- Priority Queue
- Queue Using Stacks (and Vice Versa)
Binary Trees
- Binary Search Tree (BST)
- AVL Tree
- B+ Tree
Binary Trees Traversal
- Tree Traversal
- Topological Sort
Binary Heaps
- Min Heap
- Max Heap
- Heap Sort
Hash Tables
- Hash Function
- Linear Probing
- Chaining
- Quadratic Probing
Graphs
- Graph Representation
- Graph Traversal (DFS, BFS)
Graph Algorithms
- Minimum Spanning Tree (Kruskal)
- Shortest Path (Dijkstra)
Advanced Data Structures
- Advanced Data Structures
How to Actually Prepare
- Trace algorithms by hand on a small example (5–7 elements), step by step — for sorting/traversal questions, examiners grade the trace itself, not just the final answer.
- Memorize each structure's Big-O for insert/search/delete as ONE comparison table, not in isolation — most exam questions ask you to pick the right structure for a scenario, which needs the comparison, not isolated facts.
- Practice recursive tree/graph problems by drawing the actual call stack, not just the tree — that’s where most execution-order mistakes happen.
Common Mistakes Students Make
- Mixing up when to use BFS vs DFS for a given problem (shortest path/level-order calls for BFS, connectivity/backtracking calls for DFS).
- Confusing a stack-based approach with a queue-based one when converting infix to postfix vs doing a level-order traversal.
- Giving average-case Big-O when a question specifically asks for worst-case (or vice versa) — always state which case your answer is for.
Want help with any of these topics?
Study Buddy explains Data Structures & Algorithms step by step, in Urdu or English, with diagrams and practice questions — free to start.
Start learning free