Key takeaways
- Algorithm tracing (sorting, traversals, conversions) is the most repeated question type in Data Structures papers.
- Write every algorithm in clear pseudocode with its time complexity.
- Trees and graphs usually need the most time, so practise them on paper.
- These are practice questions, not past papers; check your own syllabus and official previous papers.
About these important questions
This page lists the most important Data Structures questions for B.Tech CSE and IT exams, arranged unit by unit. The units follow the standard syllabus that most Indian technical universities share, so the order may differ slightly from yours.
Please note: these are practice questions based on common syllabus topics. They are not verified past papers, and we do not claim that any question will appear in your exam. Check your own university syllabus first, then solve the official previous year papers. AKTU students can download them from the AKTU old question paper archive.
Unit 1: Introduction, Arrays and Recursion
Covers abstract data types, complexity, asymptotic notation, arrays and recursion.
Short questions (2 marks)
- Define a data structure and an abstract data type (ADT).
- Differentiate between linear and non-linear data structures.
- What is the time-space trade-off?
- Give the formula for the address of A[i][j] in row-major and column-major order.
Long questions
- Explain Big O, Omega and Theta notation with graphs and one example each.
- A 2D array A[-5..5, 3..10] has base address 1000 and 4 bytes per element. Find the address of A[2][6] in row-major and column-major order. Hint: find the number of columns (8) first, then apply the formula carefully with the lower bounds.
- Write a recursive algorithm for Tower of Hanoi and derive its time complexity.
- Explain sparse matrices and their triplet representation with an example.
Unit 2: Stacks and Queues
Covers stack operations, expression conversion, queue types and their applications.
Short questions (2 marks)
- What is stack overflow and underflow?
- Differentiate between a stack and a queue.
- What is a priority queue?
Long questions
- Convert the infix expression
A + (B * C - (D / E ^ F) * G) * Hto postfix using a stack. Show the stack at every step in a table. - Evaluate a postfix expression such as
5 6 2 + * 12 4 / -using a stack. - Write algorithms for insertion and deletion in a circular queue and explain why it is better than a linear queue.
- Explain a deque and the input-restricted and output-restricted variants.
- How do you implement a queue using two stacks?
Write the conversion table with three columns: symbol scanned, stack, postfix output. Examiners look for this table.
Unit 3: Linked Lists
Covers singly, doubly and circular linked lists and their uses.
Short questions (2 marks)
- List two advantages of a linked list over an array.
- What is a header node?
- What is a circular linked list?
Long questions
- Write algorithms to insert a node at the beginning, end and a given position of a singly linked list.
- Write an algorithm to delete a node from a doubly linked list and explain the pointer changes with a diagram.
- Write an algorithm to reverse a singly linked list. Hint: use three pointers: previous, current and next.
- Represent the polynomial 5x^3 + 4x^2 + 2 using a linked list and write an algorithm to add two polynomials.
- Explain a stack and a queue implemented with linked lists.
Unit 4: Trees
Covers binary trees, BST, AVL trees, B-trees, heaps and Huffman coding. This unit often carries the heaviest long questions.
Short questions (2 marks)
- Define a complete and a full binary tree.
- What is the balance factor in an AVL tree?
- What is a threaded binary tree?
Long questions
- Construct a binary tree from given inorder and preorder (or postorder) traversals.
- Insert the keys 50, 20, 60, 10, 8, 15, 32, 46, 11, 48 into a BST. Then delete a node with two children.
- Insert a sequence of keys into an AVL tree, naming each rotation (LL, RR, LR, RL).
- Build a B-tree of order 3 or 5 from a list of keys and explain splitting.
- Construct a Huffman tree for given character frequencies and find the codes.
Unit 5: Graphs, Sorting, Searching and Hashing
Covers graph representation and traversal, shortest paths, spanning trees, sorting, searching and hashing.
Short questions (2 marks)
- Differentiate between an adjacency matrix and an adjacency list.
- What is a stable sort?
- What is a hash collision? Name two ways to resolve it.
Long questions
- Perform BFS and DFS on a given graph and show the queue or stack contents.
- Find the minimum spanning tree using Prim's and Kruskal's algorithms.
- Apply Dijkstra's algorithm to find shortest paths from a source vertex.
- Sort a list using quick sort, merge sort and heap sort, showing each pass, and compare their complexities.
- Insert keys into a hash table of size 10 using linear probing, quadratic probing and chaining.
- Write binary search and state its time complexity.
Sample answer outline: Infix to postfix conversion
A typical 7 to 10 mark question asks you to convert an infix expression to postfix using a stack. Structure the answer like this:
- State the rule (2 to 3 lines). Operands go straight to the output. An opening bracket is pushed. On a closing bracket, pop to the output until the opening bracket. For an operator, pop operators of higher or equal precedence (except for right-associative ^), then push the new one. At the end, pop everything left.
- Give the precedence table. ^ is highest and right-associative, then * and /, then + and -.
- Trace in a table. Use three columns (symbol, stack, postfix) and one row for every symbol scanned. Do not skip rows.
- Write the final answer clearly. For example,
A + B * CbecomesA B C * +. - Add complexity. The algorithm makes one pass, so it runs in O(n) time with O(n) stack space.
The same structure works for prefix conversion: reverse the expression, swap the brackets, convert, then reverse the result.
Marks weightage and how to write answers
A common pattern, used by AKTU and many other universities, has a compulsory short-answer section that covers every unit, followed by long-answer questions with a choice inside each unit. Marks per question change between universities and years, so confirm the scheme on a recent official paper.
- Short answers (about 2 marks): a crisp definition, one example or diagram, and nothing more. Three to five lines is enough.
- Long answers (7 to 10 marks): start with a definition, add a labelled diagram or table, explain the steps, and finish with an example, advantages or a comparison.
- For every algorithm, write the best, average and worst case time complexity at the end. It is an easy extra mark.
- Draw trees and graphs neatly with labelled nodes. A messy tree trace is hard to mark.
A 7-day revision plan for Data Structures
- Days 1 to 5: one unit a day. Read your notes, then write the long answers for that unit from memory and check them against your notes.
- Day 6: redo the tracing questions: infix to postfix, AVL rotations, BFS/DFS, Dijkstra and one sort of each kind.
- Day 7: solve one full official previous year paper in three hours, then check which units cost you time.
Keep a single sheet of formulas, definitions and diagrams for the last hour before the exam.
Download Data Structures Important Questions PDF
Data Structures Important Questions PDF
The PDF carries the same content as this page in a clean, print-ready layout, so you can read it offline and keep it for revision.
5 pages · 116 KB · PDF · Updated 5 Nov 2026