Back to Blog
BCAData StructuresVNSGUAlgorithmsDSAImportant Questions2026

BCA Sem 3 Data Structures Important Questions 2026 – VNSGU Exam Guide with Algorithms & Dry Runs

A

Ankit Singh

1 July 2026· BCA Study Guides

BCA Sem 3 Data Structures Important Questions 2026 – VNSGU Exam Guide with Algorithms & Dry Runs

📅 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.

📋 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 AShort questions — Definitions, complexities, short dry runs20 Marks
Section BAlgorithm writing & operations trace (Stacks, Queues, Lists)25 Marks
Section C ⭐Tree/Graph traversals, Sorting programs, BST construction25 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-OWorst-case upper boundBubble Sort → O(n²)
Ω(f(n))OmegaBest-case lower boundBubble Sort → Ω(n)
Θ(f(n))ThetaAverage-case tight boundMerge Sort → Θ(n log n)

Complete Big-O Complexity Table (Memorize for Exam)

Algorithm Best Case Average Case Worst Case Space
Linear SearchO(1)O(n)O(n)O(1)
Binary SearchO(1)O(log n)O(log n)O(1)
Bubble SortO(n)O(n²)O(n²)O(1)
Selection SortO(n²)O(n²)O(n²)O(1)
Insertion SortO(n)O(n²)O(n²)O(1)
Quick SortO(n log n)O(n log n)O(n²)O(log n)
Merge SortO(n log n)O(n log n)O(n log n)O(n)
BST SearchO(1)O(log n)O(n)O(n)

🔗 Unit 2: Arrays & Linked Lists

Arrays vs Linked Lists – Comparison Table

Feature Array Linked List
MemoryContiguous (fixed at declaration)Non-contiguous (dynamic)
SizeFixed at compile timeDynamic, grows/shrinks at runtime
AccessO(1) — direct index accessO(n) — must traverse from head
Insertion/DeletionO(n) — elements must shiftO(1) — pointer update only
Memory wastagePossible (pre-allocated)Extra pointer per node
Cache performanceBetter (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

Singly Linked List Each node has data + next pointer. Traversal is unidirectional (forward only). Last node's next = NULL. Simplest form. Used for stacks, queues implementations.
Doubly Linked List Each node has data + prev + next pointers. Bidirectional traversal (forward and backward). More memory per node. Used in browser history, undo-redo functionality.
Circular Linked List Last node's 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:

  1. Initialize an empty stack and output string.
  2. Scan the infix expression left to right.
  3. If operand (A–Z, 0–9) → add directly to output.
  4. If '(' → push to stack.
  5. If ')' → pop and output until '(' is found. Discard '('.
  6. If operator → pop all operators with higher or equal precedence and output them, then push current operator. (Precedence: ^ > * / > + -)
  7. After scanning all characters → pop all remaining stack elements to output.

Dry Run: Convert A + B * C - D to Postfix

Step Symbol Stack Output
1A[ ]A
2+[ + ]A
3B[ + ]AB
4*[ + * ]AB
5C[ + * ]ABC
6-[ - ]ABC*+
7D[ - ]ABC*+D
EndEOF[ ]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.

Simple Queue: Suffers memory wastage — positions freed at Front cannot be reused once Rear reaches MAX-1.
Circular Queue: Rear wraps to 0 after MAX-1. Reuses freed positions. Efficient. Formula: Rear = (Rear + 1) % MAX
Priority Queue: Elements dequeued by priority, not arrival order. Used in CPU scheduling (Shortest Job First).
Deque (Double-Ended Queue): Insertion and deletion allowed at both Front and Rear ends.

🌳 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)

  1. Construct a Binary Search Tree for the given sequence. Write Preorder, Inorder, and Postorder traversal outputs. ⭐⭐⭐
  2. Convert the given Infix expression to Postfix using a stack. Show step-by-step trace with stack states. ⭐⭐⭐
  3. Explain Bubble Sort algorithm. Trace it for the array [5, 3, 8, 1, 9, 2]. Show each pass. ⭐⭐⭐
  4. Write a C program to implement a Stack using an array. Implement PUSH, POP, and display operations. ⭐⭐
  5. 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)

  1. What is a Circular Queue? Explain with diagram. How does it overcome limitation of Simple Queue? ⭐⭐⭐
  2. Compare Singly, Doubly, and Circular Linked Lists with a table. Write C structure for each. ⭐⭐
  3. Explain Binary Search algorithm. Trace it on sorted array [2, 5, 9, 14, 22, 35, 48] for key = 22. ⭐⭐
  4. What are asymptotic notations? Explain Big-O, Omega, and Theta with examples and graphs. ⭐⭐
  5. 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

  1. Write a definition first: 2-line definition of the data structure or algorithm before the trace.
  2. Label every step: For Bubble Sort, label "Pass 1", "Pass 2" etc. For BST, label each insertion step.
  3. Draw a neat diagram: BST diagram, linked list chain, or stack/queue diagram earns presentation marks.
  4. Write the final output: For traversal, write "Inorder Output: 20, 30, 40, 50..." explicitly.
  5. Include complexity: After every algorithm, state its Time and Space complexity. This earns 1–2 bonus marks.
❌ Top Mistakes That Cost Full 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
✅ Pro Tips to Score 60+ in Data Structures:
  • 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

Q1: What are the most important topics for BCA Sem 3 Data Structures VNSGU 2026? A: The highest-frequency topics are: (1) Stack + Infix-to-Postfix conversion, (2) BST construction and traversal, (3) Linked List operations, (4) Bubble Sort dry run, and (5) Big-O complexity table. These 5 topics cover approximately 70% of the exam marks.
Q2: What is the difference between Stack and Queue? A: Stack → LIFO (Last In First Out). All operations at Top. Used for expression conversion, recursion, undo. Queue → FIFO (First In First Out). Insertion at Rear, deletion at Front. Used for scheduling, BFS, print spooling.
Q3: How do I convert Infix to Postfix step by step? A: Scan left to right: Operands → output directly. '(' → push. ')' → pop until '('. Operator → pop higher/equal precedence operators then push current. At end → pop all. Example: A+B*C → ABC*+
Q4: What is a Binary Search Tree and how do you construct it? A: BST rule: left child < parent, right child > parent. Insert elements one by one comparing each with root and going left/right accordingly. Inorder traversal of any BST always produces sorted output — this is a key exam point.
Q5: What is Stack Overflow and Stack Underflow? A: Overflow → PUSH on full stack (Top == MAX-1). Underflow → POP on empty stack (Top == -1). In recursive programs, missing base case causes Stack Overflow by exhausting call stack memory.
Q6: Why does Bubble Sort have O(n²) worst-case complexity? A: Bubble Sort performs n-1 passes. In each pass i, it makes n-i-1 comparisons. Total comparisons = (n-1)+(n-2)+...+1 = n(n-1)/2 ≈ n². Hence O(n²) worst case. Best case is O(n) when array is already sorted and we use a flag to detect no swaps.
Q7: What is the difference between Singly, Doubly, and Circular Linked Lists? A: Singly: one-directional, last→NULL. Doubly: bidirectional (prev+next pointers), last→NULL. Circular: last node points back to first, no NULL. Circular is used in round-robin scheduling and circular buffers.
Q8: How is a Circular Queue better than a Simple Queue? A: Simple Queue wastes memory — positions freed at Front can't be reused once Rear reaches MAX-1. Circular Queue wraps Rear to 0 using formula Rear = (Rear+1) % MAX, reusing freed positions. This eliminates the false-full condition.
Q9: Why must Binary Search require a sorted array? A: Binary Search works by comparing the key with the middle element and eliminating half the array. This elimination logic only works if elements are in order — if unsorted, after comparing with mid, we can't determine which half contains the target.
Q10: Where can I download VNSGU BCA Sem 3 Data Structures past papers? A: Download free at questionbanker.in/papers/bca. Past papers from 2021–2025 are the best way to identify which algorithm traces and BST problems actually appear — the patterns repeat reliably.

📌 Related VNSGU BCA Study Resources

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