BCA Sem 3 Data Structures Important Questions 2026 – VNSGU Exam Guide with Algorithms & Dry Runs
Ankit Singh
1 July 2026· BCA Study Guides

📅 Last Updated: 1 July 2026 | Covers all 5 units with algorithm dry runs, C code snippets, infix-to-postfix worked examples, BST construction trace, and past 5-year question frequency analysis.
Data Structures and Algorithms (DSA) is the most critical technical subject in VNSGU BCA Semester 3. It is the foundation of every programming interview, placement test, and advanced subject in Semesters 4–6. Examiners don't just test definitions — they test dry runs, algorithm writing, and C code. This guide gives you everything: unit notes, complete worked examples, Big-O table, BST construction, infix-to-postfix conversion, sorting traces, and the exact questions that appear year after year.
📑 Table of Contents
- 👉 VNSGU Syllabus & Exam Blueprint 2026
- 👉 Unit 1: Intro, Classification & Big-O Complexity
- 👉 Unit 2: Arrays & Linked Lists (With C Code)
- 👉 Unit 3: Stacks & Queues + Infix-to-Postfix Dry Run
- 👉 Unit 4: Trees & Graphs + BST Construction Trace
- 👉 Unit 5: Sorting & Searching + Bubble Sort Trace
- 👉 Important Questions – Past 5 Years Analysis
- 👉 Exam Strategy & Common Mistakes
- 👉 FAQs
📋 VNSGU BCA Sem 3 Data Structures Syllabus & Exam Blueprint 2026
| Unit | Topic | Exam Weightage | Question Type |
|---|---|---|---|
| Unit 1 | Introduction, Classification, Complexity, Big-O | 10–15 marks | Definitions, classification diagram, complexity table |
| Unit 2 | Arrays, Linked Lists (Singly, Doubly, Circular) | 15–20 marks | C struct code, insertion/deletion steps, comparison table |
| Unit 3 ⭐ | Stacks, Queues, Infix-to-Postfix Conversion | 20–25 marks | Algorithm writing, expression conversion dry run |
| Unit 4 ⭐ | Binary Trees, BST, Graph Representation | 20–25 marks | BST construction trace, traversal output, diagram |
| Unit 5 | Sorting (Bubble, Quick, Merge) & Searching | 15–20 marks | Step-by-step sort trace, algorithm, complexity comparison |
| Section | Question Type | Marks |
|---|---|---|
| Section A | Short questions — Definitions, complexities, short dry runs | 20 Marks |
| Section B | Algorithm writing & operations trace (Stacks, Queues, Lists) | 25 Marks |
| Section C ⭐ | Tree/Graph traversals, Sorting programs, BST construction | 25 Marks |
🔢 Unit 1: Introduction, Classification & Big-O Complexity
What is a Data Structure?
Definition: A Data Structure is a systematic way of organizing, storing, and managing data in a computer's memory so that operations (insertion, deletion, search, traversal) can be performed efficiently.
Key difference — Data vs Information: Data is raw, unprocessed facts (e.g., "25"). Information is processed, meaningful data with context (e.g., "A student's age is 25").
Classification of Data Structures
- Primitive: Directly operated on by machine instructions — Integer, Float, Char, Double, Boolean, Pointer.
- Non-Primitive Linear: Elements in sequential order — Array, Stack, Queue, Linked List.
- Non-Primitive Non-Linear: Hierarchical or network organization — Tree, Graph.
Asymptotic Notation (Big-O, Omega, Theta)
| Notation | Name | Represents | Example |
|---|---|---|---|
| O(f(n)) | Big-O | Worst-case upper bound | Bubble Sort → O(n²) |
| Ω(f(n)) | Omega | Best-case lower bound | Bubble Sort → Ω(n) |
| Θ(f(n)) | Theta | Average-case tight bound | Merge Sort → Θ(n log n) |
Complete Big-O Complexity Table (Memorize for Exam)
| Algorithm | Best Case | Average Case | Worst Case | Space |
|---|---|---|---|---|
| Linear Search | O(1) | O(n) | O(n) | O(1) |
| Binary Search | O(1) | O(log n) | O(log n) | O(1) |
| Bubble Sort | O(n) | O(n²) | O(n²) | O(1) |
| Selection Sort | O(n²) | O(n²) | O(n²) | O(1) |
| Insertion Sort | O(n) | O(n²) | O(n²) | O(1) |
| Quick Sort | O(n log n) | O(n log n) | O(n²) | O(log n) |
| Merge Sort | O(n log n) | O(n log n) | O(n log n) | O(n) |
| BST Search | O(1) | O(log n) | O(n) | O(n) |
🔗 Unit 2: Arrays & Linked Lists
Arrays vs Linked Lists – Comparison Table
| Feature | Array | Linked List |
|---|---|---|
| Memory | Contiguous (fixed at declaration) | Non-contiguous (dynamic) |
| Size | Fixed at compile time | Dynamic, grows/shrinks at runtime |
| Access | O(1) — direct index access | O(n) — must traverse from head |
| Insertion/Deletion | O(n) — elements must shift | O(1) — pointer update only |
| Memory wastage | Possible (pre-allocated) | Extra pointer per node |
| Cache performance | Better (contiguous memory) | Worse (scattered memory) |
Linked List Node Structure in C
struct Node { int data; struct Node* next; // Singly Linked List }; // Doubly Linked List Node struct DNode { int data; struct DNode* prev; struct DNode* next; };
Types of Linked Lists
data + next pointer. Traversal is unidirectional (forward only). Last node's next = NULL. Simplest form. Used for stacks, queues implementations.
data + prev + next pointers. Bidirectional traversal (forward and backward). More memory per node. Used in browser history, undo-redo functionality.
next points back to the first node (not NULL), forming a loop. Can be singly or doubly circular. Used in round-robin CPU scheduling, circular buffers, and multiplayer board games.
📚 Unit 3: Stacks & Queues
Stack — LIFO Data Structure
A Stack follows Last In, First Out (LIFO) — the element inserted last is the first to be removed. All operations occur at a single end called the Top.
Stack Operations in C (Array Implementation)
#define MAX 100 int stack[MAX], top = -1; // PUSH Operation void push(int val) { if (top == MAX - 1) printf("Stack Overflow! "); else stack[++top] = val; } // POP Operation int pop() { if (top == -1) { printf("Stack Underflow! "); return -1; } return stack[top--]; }
⭐ Infix to Postfix Conversion – Fully Worked Example
This question appears in every VNSGU paper. Memorize the algorithm AND practice the dry run.
Algorithm — Infix to Postfix:
- Initialize an empty stack and output string.
- Scan the infix expression left to right.
- If operand (A–Z, 0–9) → add directly to output.
- If '(' → push to stack.
- If ')' → pop and output until '(' is found. Discard '('.
- If operator → pop all operators with higher or equal precedence and output them, then push current operator. (Precedence: ^ > * / > + -)
- After scanning all characters → pop all remaining stack elements to output.
Dry Run: Convert A + B * C - D to Postfix
| Step | Symbol | Stack | Output |
|---|---|---|---|
| 1 | A | [ ] | A |
| 2 | + | [ + ] | A |
| 3 | B | [ + ] | AB |
| 4 | * | [ + * ] | AB |
| 5 | C | [ + * ] | ABC |
| 6 | - | [ - ] | ABC*+ |
| 7 | D | [ - ] | ABC*+D |
| End | EOF | [ ] | ABC*+D- |
✅ Result: A + B * C - D → Postfix: ABC*+D-
Queue — FIFO Data Structure
A Queue follows First In, First Out (FIFO). Insertions at Rear, deletions at Front.
Rear = (Rear + 1) % MAX🌳 Unit 4: Trees & Graphs
Binary Tree Terminology
- Root: The topmost node with no parent.
- Leaf Node: Node with no children.
- Height: Length of the longest path from root to a leaf.
- Degree: Number of children a node has (max 2 for binary tree).
- Strictly Binary Tree: Every node has 0 or exactly 2 children.
- Complete Binary Tree: All levels fully filled except possibly the last, which is filled left to right.
⭐ BST Construction – Fully Worked Dry Run
Construct BST for: 50, 30, 70, 20, 40, 60, 80 and write all three traversals.
Insert 50 → Root = 50
Insert 30 → 30 < 50 → Go LEFT of 50
Insert 70 → 70 > 50 → Go RIGHT of 50
Insert 20 → 20 < 50 → LEFT of 50 → 20 < 30 → LEFT of 30
Insert 40 → 40 < 50 → LEFT of 50 → 40 > 30 → RIGHT of 30
Insert 60 → 60 > 50 → RIGHT of 50 → 60 < 70 → LEFT of 70
Insert 80 → 80 > 50 → RIGHT of 50 → 80 > 70 → RIGHT of 70
Final BST:
50
/ 30 70
/ / 20 40 60 80
Traversal Outputs:
- Preorder (Root → Left → Right):
50, 30, 20, 40, 70, 60, 80 - Inorder (Left → Root → Right):
20, 30, 40, 50, 60, 70, 80← Always sorted output ⭐ - Postorder (Left → Right → Root):
20, 40, 30, 60, 80, 70, 50
Graph Terminology
- Vertex (Node): Fundamental unit of a graph.
- Edge: Connection between two vertices.
- Directed Graph (Digraph): Edges have direction (A→B ≠ B→A).
- Undirected Graph: Edges have no direction (A-B = B-A).
- Weighted Graph: Each edge has a numeric weight/cost.
- Adjacency Matrix: 2D array where matrix[i][j] = 1 if edge exists between vertex i and j.
- Adjacency List: Array of linked lists; each index stores a list of its neighboring vertices.
🔄 Unit 5: Sorting & Searching Algorithms
⭐ Bubble Sort – Complete Step-by-Step Trace
Sort: [64, 34, 25, 12, 22] using Bubble Sort
Initial: [ 64, 34, 25, 12, 22 ] Pass 1: Compare adjacent pairs, swap if left > right 64 > 34 → SWAP [ 34, 64, 25, 12, 22 ] 64 > 25 → SWAP [ 34, 25, 64, 12, 22 ] 64 > 12 → SWAP [ 34, 25, 12, 64, 22 ] 64 > 22 → SWAP [ 34, 25, 12, 22, 64 ] ← 64 settled Pass 2: 34 > 25 → SWAP [ 25, 34, 12, 22, 64 ] 34 > 12 → SWAP [ 25, 12, 34, 22, 64 ] 34 > 22 → SWAP [ 25, 12, 22, 34, 64 ] ← 64, 34 settled Pass 3: 25 > 12 → SWAP [ 12, 25, 22, 34, 64 ] 25 > 22 → SWAP [ 12, 22, 25, 34, 64 ] ← settled Pass 4: 12 < 22 → No swap [ 12, 22, 25, 34, 64 ] ← Done Sorted Result: [ 12, 22, 25, 34, 64 ] Passes needed: 4 | Total comparisons: 10
Quick Sort Algorithm
Quick Sort selects a pivot element, partitions the array so elements smaller than pivot go left and larger go right, then recursively sorts both partitions.
void quickSort(int arr[], int low, int high) { if (low < high) { int pi = partition(arr, low, high); quickSort(arr, low, pi - 1); quickSort(arr, pi + 1, high); } }
Binary Search Algorithm
Binary Search requires a sorted array. It eliminates half the search space with each comparison.
int binarySearch(int arr[], int n, int key) { int low = 0, high = n - 1; while (low <= high) { int mid = (low + high) / 2; if (arr[mid] == key) return mid; // Found else if (arr[mid] < key) low = mid + 1; // Search right else high = mid - 1; // Search left } return -1; // Not found }
⭐ Most Important Questions – Past 5 Years VNSGU Analysis (2021–2025)
Section C / Long Questions (10 marks – Appear Almost Every Year)
- Construct a Binary Search Tree for the given sequence. Write Preorder, Inorder, and Postorder traversal outputs. ⭐⭐⭐
- Convert the given Infix expression to Postfix using a stack. Show step-by-step trace with stack states. ⭐⭐⭐
- Explain Bubble Sort algorithm. Trace it for the array [5, 3, 8, 1, 9, 2]. Show each pass. ⭐⭐⭐
- Write a C program to implement a Stack using an array. Implement PUSH, POP, and display operations. ⭐⭐
- Explain Linked List. Write algorithms for insertion at beginning, end, and after a given node. ⭐⭐
Section B / Medium Questions (7 marks – Appear 4–5 of 5 years)
- What is a Circular Queue? Explain with diagram. How does it overcome limitation of Simple Queue? ⭐⭐⭐
- Compare Singly, Doubly, and Circular Linked Lists with a table. Write C structure for each. ⭐⭐
- Explain Binary Search algorithm. Trace it on sorted array [2, 5, 9, 14, 22, 35, 48] for key = 22. ⭐⭐
- What are asymptotic notations? Explain Big-O, Omega, and Theta with examples and graphs. ⭐⭐
- Explain Quick Sort with an example. What is its best and worst-case time complexity? ⭐
Short Questions (2 marks – Almost Always Present)
- Define: Stack Overflow, Stack Underflow, Deque, Sparse Matrix, Header Linked List
- What is LIFO? What is FIFO? Give one application each.
- What is the time complexity of Binary Search? Why must the array be sorted?
- What is an adjacency matrix? Draw one for a small graph.
- State the difference between linear and non-linear data structures with examples.
💡 Exam Strategy & Common Mistakes
How to Score Full Marks in Algorithm/Trace Questions
- Write a definition first: 2-line definition of the data structure or algorithm before the trace.
- Label every step: For Bubble Sort, label "Pass 1", "Pass 2" etc. For BST, label each insertion step.
- Draw a neat diagram: BST diagram, linked list chain, or stack/queue diagram earns presentation marks.
- Write the final output: For traversal, write "Inorder Output: 20, 30, 40, 50..." explicitly.
- Include complexity: After every algorithm, state its Time and Space complexity. This earns 1–2 bonus marks.
- Writing infix-to-postfix output without showing intermediate stack states (loses 60% marks)
- Constructing BST without showing step-by-step insertion logic
- Forgetting to write traversal outputs after BST construction
- Writing Bubble Sort without showing each pass as a separate row
- Not stating overflow/underflow conditions in stack/queue algorithms
- Confusing "Inorder always gives sorted output from BST" — this is a guaranteed 1-mark point, don't miss it
- Mixing up LIFO (Stack) and FIFO (Queue) in short questions
- Practice infix-to-postfix for 5 different expressions — they always change the expression but the algorithm is the same
- Construct BST for at least 10 different sequences — pattern recognition speeds you up significantly in exam
- Memorize the Big-O table completely — it appears as a comparison table question almost every year
- Write clean, box-structured Bubble Sort traces with clear swap annotations
- Know the C struct for both Singly and Doubly Linked List by heart — 2-mark questions come from here
- The Circular Queue "Rear = (Rear+1) % MAX" formula is a 1-mark guaranteed point — never forget it
❓ Frequently Asked Questions
📌 Related VNSGU BCA Study Resources
- 💻 VNSGU BCA Previous Year Papers – All Semesters Free Download
- ☕ BCA Sem 4 Java Important Questions – VNSGU 2026
- 🌐 BCA Sem 5 Web Development Project Ideas – VNSGU
- 📅 VNSGU Exam Time Table 2026 – BCA & B.Com Schedule
- 📝 VNSGU Exam Form Fill Up Process 2026 – Step-by-Step
Practice With Real VNSGU BCA Papers
The fastest way to crack DSA is practicing real algorithm-tracing problems from past VNSGU papers. Patterns repeat every year.
About the Author
Ankit Singh is a VNSGU BCA graduate and founder of QuestionBanker. He analyzed 5 years of VNSGU BCA Sem 3 Data Structures papers to identify recurring patterns in BST construction, infix-to-postfix traces, and sorting dry runs. He has personally mentored 500+ BCA students through their DSA exam preparation.
📧 ankit@questionbanker.in | More about me
Last updated: 1 July 2026 | Reference: VNSGU Official Website
Based on past VNSGU BCA Sem 3 question paper analysis. Always verify the current syllabus from the official VNSGU portal before your exam.
Keep reading more exam guides
All Blog Posts