Data Structure & Algorithms Chapter Wise Important Questions

0
Cyber law & Professional Ethics MCQs

Data Structure & Algorithms Chapter Wise Important Questions

Chapter 1: Introduction to Data Structure

  1. What is data structure? Explain its importance in programming.
  2. What is Abstract Data Type (ADT)? Explain with example.
  3. Differentiate between static and dynamic data structures.
  4. What are the different operations performed on data structures? Explain each.
  5. Explain the classification of data structures with a neat diagram.

Chapter 2: The Stack

  1. Explain stack as an ADT. Describe PUSH and POP operations with algorithm.
  2. List and explain the applications of stack.
  3. Convert the following infix expression to postfix using stack:
    • a$b*c-d+e/f/(g+h)
    • P+Q-(R*S/T+U)-V*W
    • ((A+B)-C*D/E)*(H-I)*F+G
  4. Evaluate the following postfix expression using stack: 4 5 + 7 3 – 2 + *
  5. Describe linked list implementation of stack operations.
  6. What is the difference between stack and queue? What are the general applications of a stack?
  7. Convert infix to prefix expression using stack with example.
  8. Write a program to implement basic operations of stack using array.

Chapter 3: Queue

  1. Define linear queue and circular queue. What are the limitations of linear queue? How does circular queue overcome them?
  2. Write an algorithm to enqueue and dequeue elements in a circular queue.
  3. What is a priority queue? Explain with example.
  4. How can dynamic implementation of queue be done? Explain with algorithm.
  5. Write an algorithm to insert and delete elements in a linear queue.
  6. Differentiate between queue and circular queue with suitable diagram.
  7. What is dequeue (double ended queue)? Explain its types and operations.

Chapter 4: List

  1. Differentiate between static and dynamic list structures.
  2. Explain array implementation of lists with example.
  3. Explain queue as a list with dynamic implementation and algorithm.
  4. What are the advantages and disadvantages of array implementation of list?
  5. How is a list different from an array? Explain with example.

Chapter 5: Linked Lists

  1. What is a linked list? Describe the types of linked list with their advantages.
  2. Write an algorithm to insert and delete a node at the beginning and end of a singly linked list.
  3. Write an algorithm to insert and delete a node at the beginning and end of a doubly linked list.
  4. How does doubly linked list differ from circular linked list? Explain with example.
  5. Write algorithms for all four operations in circular linked list: insert at beginning, insert at end, delete from beginning, delete from end.
  6. Explain linked stack and linked queue with dynamic implementation.
  7. What are the advantages of linked list over array? Explain.
  8. Write an algorithm to search an element in a singly linked list.
  9. What is a header linked list? Explain with example.
  10. Explain the concept of doubly linked list with insertion and deletion at any position.

Chapter 6: Recursion

  1. What is recursion? Write an algorithm to solve the Tower of Hanoi problem.
  2. Write a recursive function to compute Fibonacci series up to nth term.
  3. Differentiate between recursion and iteration with example.
  4. What is the principle of recursion? Explain applications of recursion.
  5. What are the advantages and disadvantages of recursive algorithms?
  6. Explain how recursion uses stack internally with a suitable example.
  7. Write a recursive program to calculate factorial of a number.

Chapter 7: Trees

  1. Perform pre-order, in-order, and post-order traversal of a given binary tree.
  2. Construct a BST from given data and explain insertion and deletion operations in detail.
    • Data: 14, 11, 12, 19, 15, 22, 13, 8, 33, 7, 9, 20
  3. Construct an AVL tree from given data and explain the balancing algorithm with rotations.
    • Data: 18, 12, 14, 8, 5, 25, 31, 24, 27
  4. What is a Huffman tree? Create a Huffman tree and calculate Huffman codes for given characters and frequencies.
  5. Given in-order and pre-order traversal sequences, reconstruct the binary tree.
    • In-order: R Z J T K H N M P, Pre-order: K Z R T J N H P M
  6. Differentiate between strict binary tree and skewed binary tree.
  7. What is a B-tree? Create a B-tree of order 4 from given data and explain insertion and deletion.
    • Data: 6, 4, 22, 10, 2, 14, 3, 8, 11, 13, 5, 9
  8. Differentiate between BST and AVL tree. Explain balance factor with example.
  9. What is tree height, level, and depth of a node? Explain with example.
  10. What is a complete binary tree? Explain heap as a complete binary tree.
  11. Explain game tree with example.
  12. What is the difference between binary tree and binary search tree?

Chapter 8: Sorting

  1. Explain heap sort algorithm and trace it to sort given data.
    • Data: 12, 9, 1, 13, 16, 24, 21, 5
  2. Implement quick sort and trace it on given data. Explain its Big-O notation for best, average, and worst case.
    • Data: 12, 1, 14, 7, 2, 10, 4, 7, 22, 6, 15
  3. What is insertion sort? Trace and sort given data using insertion sort.
    • Data: 90, 57, 80, 10, 22, 21, 45, 9, 78
  4. Differentiate between internal sorting and external sorting algorithms. Explain with example.
  5. Explain merge sort algorithm with example and trace.
  6. What is bubble sort? Trace it on given data.
  7. What is shell sort? How does it improve over insertion sort?
  8. Explain selection sort with algorithm and example.
  9. What is radix sort? Explain with example.
  10. Compare the time complexity (Big-O) of all major sorting algorithms.

Chapter 9: Searching

  1. What is hashing? Explain different types of collision resolution techniques with suitable examples.
  2. What is binary search? Write an algorithm and trace it to search a key in given data.
    • Data: 11, 19, 5, 2, 7, 21, 8, 21, 12 — search key: 12
  3. Explain sequential (linear) search algorithm with illustration and complexity.
  4. Compare the efficiency of different search techniques.
  5. Explain hash functions and hash tables with example.
  6. What is open addressing? Explain linear probing, quadratic probing, and double hashing.
  7. What is chaining (closed hashing)? Explain with example.
  8. Insert keys 62, 37, 36, 44, 67, 91, 107 into a hash table of size 10 using linear probing.
  9. What is tree search? Explain general search tree.
  10. What are the advantages of hashing over other search techniques?

Chapter 10: Graphs

  1. How can a graph be represented using an adjacency matrix and adjacency list? Explain with example.
  2. Explain Depth First Search (DFS) traversal with suitable example.
  3. Explain Breadth First Search (BFS) traversal with suitable example.
  4. Explain Kruskal’s algorithm to find Minimum Spanning Tree (MST) with example.
  5. Describe Prim’s algorithm to find MST with suitable illustration.
  6. Use Dijkstra’s algorithm to find shortest path from a source node to all other nodes.
  7. What is a spanning tree? What is MST? Differentiate between Kruskal’s and Prim’s algorithm.
  8. What is Warshall’s algorithm? Explain transitive closure with example.
  9. Differentiate between directed and undirected graphs. Explain types of graphs.
  10. What is a weighted graph? Explain with example.
  11. Explain graph as an ADT with its basic operations.

Chapter 11: Algorithms

  1. What are deterministic and non-deterministic algorithms? Explain with example.
  2. Define divide and conquer algorithm. Explain with suitable example.
  3. What is Big-O notation? Explain how to measure the time complexity of an algorithm with example.
  4. Write the difference between serial and parallel algorithms with example.
  5. Define greedy algorithm and explain with example.
  6. What are heuristic and approximate algorithms? Explain with example.
  7. Explain best case, average case, and worst case complexity with example.
  8. What is space complexity? How does it differ from time complexity?
  9. Explain the significance of algorithm analysis in software development.
  10. What is a minimax algorithm? Explain with example.

📝 Note:This list is for reference purposes only to help you prepare smartly and cover all critical areas of  DSA. Always review your class notes, teacher guidelines, and syllabus coverage.

Don’t use our content without permission. 📸⚠️

Thank you for sharing you everyone! If you’d like to share your notes, lab reports, solution, assignments, projects, or any other academic materials, feel free to contact us through social media (Uni Bytes), email us at unibytesofficials@gmail.com.

We regularly provide updates on BCA news, results, exam routines, and other important information. Stay connected with Uni Bytes for all your academic needs

Don’t Forget to Follow Uni Bytes

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!