BSc CSIT Third Semester DSA: Important Chapter-Wise Questions

GYAN WALLA
5 minute read
0





BSc CSIT Third Semester DSA: Important Chapter-Wise Questions

Welcome, Third Semester BSc CSIT students! Preparing for your Data Structures and Algorithms (DSA) exam requires understanding key concepts and practicing relevant problems. To help you focus your studies, we've compiled a list of important questions based on past papers and the official syllabus, categorized chapter-wise. Use this guide to test your knowledge and prepare effectively for your examinations.


Unit 1: Introduction

  1. What is asymptotic analysis? Explain theta notation with an example.

  2. Why do we need asymptotic notation? Describe Big oh notation with its curve.

  3. Explain Big Oh notation in brief. Find Big Oh of the function: f(x) = 5x⁴ + 9x² + 7x + 9.

  4. What do you mean by complexity of algorithms? How do you find time complexity?

  5. How do you find complexity of algorithms? Explain.

  6. Describe the Big ‘O’ notation.

  7. What is data structure? Show the status of stack converting infix to prefix A+(B*C-(D/E^F)*G).

  8. What is ADT? Discuss stack as an ADT.

  9. What is dynamic memory allocation? Compare data structure with abstract data type.

  10. What do you mean by structure and union?


Unit 2: Stack

  1. What is stack? What are the different applications of stack? Explain stack operations with example.

  2. Explain push and pop operations of stack. What are different applications of stack?

  3. Convert infix expression A+(((B-C)*(D-E)+F)/G)$(H-I) to postfix using stack.

  4. Evaluate the postfix expression 574-*8/4+ using stack.

  5. Explain the infix to postfix conversion algorithm.

  6. Explain algorithm for evaluation of postfix expression using stack.

  7. Evaluate the expression ABCD-x+ using stack where A=5, B=4, C=3 and D=7.

  8. How recursive algorithm uses stack to store intermediate results? Convert the infix expression A+B-(CD/E+F)-GH to postfix expression using stack.


Unit 3: Queue

  1. Define queue. Explain enqueue and dequeue operation in circular queue.

  2. What is linear queue? Why do we need circular queue? Explain.

  3. Define queue. What are different applications of queue? Explain queue operations with example.

  4. Explain queue as an ADT. Write a program to implement linear queue. Compare linear queue with circular queue.

  5. Define circular queue. How queue differs from stack. Write a program to implement linear queue.

  6. What is priority queue? Why do you need this type of queue?

  7. Write short notes on: Priority Queue.


Unit 4: Recursion

  1. Explain tail recursion with example. Compare recursion with iteration.

  2. Write a recursive program to find nth Fibonacci number.

  3. Write recursive algorithm to get Fibonacci term. Illustrate it drawing recursive tree.

  4. Write a program to find GCD of two numbers using recursion.

  5. Write a recursive program to find GCD of two numbers.

  6. Explain the Tower of Hanoi (TOH) with practical example.

  7. State problem Tower of Hanoi. Explain the algorithm to solve problem.

  8. Define recursive algorithm? How do you implement recursive algorithms while writing computer programs?


Unit 5: Lists

  1. Define list. How can you use linked list to implement stack? Explain circular linked list.

  2. Explain circular linked list with example. How do you implement linked list operation in singly linked list? Explain.

  3. How do you insert and delete a node at kth position of the doubly linked list? Describe the process of implementing stack and queue using linked list.

  4. What is the algorithm for node insertion and deletion from specified position from doubly linked list?

  5. How can you use linked list to implement stack? Explain.

  6. What is singly linked list? Write an algorithm to add a node at the beginning and end of singly linked list.

  7. How is linked list different from array?

  8. Explain array implementation of list.

  9. What do you mean by double linked list? Explain with example.

  10. What are the benefits of using linked list over array? How can you insert a node in a singly linked list?

  11. State relative merits and demerits of contiguous list and linked list.

  12. Define Contiguous List as ADT. Write C program to implement the operation of Contiguous List.


Unit 6: Sorting

  1. Sort the number {82, 73, 12, 39, 26, 88, 2, 9, 60, 41} using shell sort.

  2. Trace selection sort algorithm with array of numbers 2, 81, 6, 45, 11, 21, 23, 41, and 11.

  3. Sort the numbers 82,73,12,39,26,88,2,9,60,41 using shell sort.

  4. Hand test bubble sort with array of numbers 53, 42, 78, 3, 5, 2, 15 in ascending order.

  5. Hand test selection sort with array of numbers 4, 71, 32, 19, 61, 2, -5 in descending order.

  6. What is insertion sort? Trace and sort the following data using the insertion sorting algorithm: 90, 56, 80, 10, 22, 21, 45, 9.

  7. Write a program to implement insertion sort.

  8. Hand test quick algorithm with array of numbers (78, 34, 21, 43, 7, 18, 9, 56, 38, 19). What is time complexity of quick sort?

  9. In which case is the pivot element in quick sort always either in the last or first position? Create a max heap from the numbers. {10,12,53,34,23,77,59,66,5,8}.

  10. Write short notes on: Divide and Conquer sorting.


Unit 7: Searching and Hashing

  1. What is hashing? How do you apply linear probing and rehashing? Explain with example.

  2. Define hash table and hash function. What is collision in hashing? Explain linear probing and quadratic probing with suitable example.

  3. Assume you have to store the data {0,1,2,4,5,7} into a hash table of size 5 with h(x)=x%5. Apply linear probing and double hashing.

  4. What is hashing? Explain concept of hash table and hash function with example.

  5. What is hashing? Discuss rehashing with example.

  6. What do you mean by sequential searching and binary searching? Differentiate between them.

  7. What is binary search? Write a program to implement binary search.

  8. Explain binary search with an example. What is the time complexity of binary search?

  9. Write a program to implement sequential search algorithm.


Unit 8: Trees and Graphs

  1. What is binary search tree? Write a program to implement insertion and deletion algorithms in binary search tree.

  2. Illustrate the algorithm for Binary search tree with example.

  3. What are the types of binary tree? Compare between them.

  4. Differentiate between pre-order traversal and in-order traversal.

  5. How do you traverse a binary tree? Discuss.

  6. Explain AVL tree with example. Also, explain balancing algorithm for this tree.

  7. What is AVL tree? How does heap differ from tree? Construct AVL tree for: 24,12,8,15,35,30,57,40,45,78.

  8. Why do we need to balance the binary search tree? Create AVL tree for: 24,12,8,15,35,30,57,40,45,78.

  9. What is shortest path? Explain Dijkstra algorithm with suitable example.

  10. Write Dijkstra’s algorithm to find shortest path between two vertices of a graph.

  11. What is the application of spanning tree? Draw MST of a graph with 8 vertices and 11 edges.

  12. Find MST using Prim’s algorithm.



  13. What is minimum spanning tree? Explain.

  14. Explain Kruskal Algorithm with example.

  15. What is graph traversal? Explain.

  16. Discuss depth first and breadth first traversal of a graph with suitable example.

  17. What do you mean by breadth first search in graph? Explain with recursive tree.

  18. Write short notes on: Breadth First traversal of a graph.

  19. Write short notes on: Game tree.



We hope this compilation of chapter-wise questions helps streamline your DSA preparation. Remember to understand the underlying concepts, not just memorize solutions. Practice implementing these algorithms and data structures. Good luck with your studies and exams! 

Tags

Post a Comment

0Comments

Post a Comment (0)