Data Structure and Algorithm old Question BCA Third Semester

BCA Data Structure and Algorithm old Question 2023

Group B

  1. Define stack. Why stack is considered as an ADT? List any four applications of stack. [1+2+2]
  2. Evaluate the following postfix expression using the stack: 4 5+7 3-2+* [5]
  3. What is tower of Hanoi problem? How recursion can be used to solve tower of Hanoi problem? [2+3]
  4. Define hashing. Explain how to resolve collisions during hashing using open addressing. [1+4]
  5. What is binary search? Trace the algorithm of binary search to search a key 12 in the data: 11, 19, 5, 2, 7, 21, 8, 21, 12 [1+4]
  6. What is big-oh notation? Explain about divide and conquer strategy with example. [2+3]
  7. What are the depth and degree of a node in a tree? Perform pre-order, in-order and post-order traversal of the following tree: [2+3]

Group C

  1. How dynamic implementation of the queue can be done? Explain with algorithm. Also explain how insertion and deletion of a node can be done at the end of a singly linked list with algorithm. [5+5]
  2. Define complete binary tree and skewed tree. Write a function to implement heap sort and sort the following data using heap sort: 12, 9, 1, 13, 16, 2, 4, 21, 5 [2+4+4]
  3. How breadth first traversal and depth first traversal can be used for traversing a graph? Explain [2+4+4] with example. Use Dijkstra’s algorithm to find the shortest path from node A to all other nodes for the following graph. [5+5]

Data Structure and Algorithm old Question 2020

Group B

Attempt any Six question

2. What is Data Structure? Explain different operations to be performed on data structure [1 + 4]

3. Define Greedy Algorithm and heuristic algorithm. Briefly explain Big-Oh Notation [3 + 2]

4. What is circular queue? Write an algorithm to insert an item in circular queue [2 + 3]

5. How does ABL tree differ from BST? Construct and AVL tree from following data: 35, 56,68,65,44,41,31,49,20

6. What is B-tree? Create a B-Tree of order 4 using following data 6,4,22,10,2,14,3,8,11,13,5,9

7. What is binary search? Write an algorithm to search an item using binary search [ 2 + 3]

8. What is graph? Explain Kruskal’s algorithm to construct minimum spanning tree with example [1 + 4]

Group C

Attempt any two question

9. Define stack. List the applications of stack. Trace the algorithm to convert infix to postfix with following infix expression ((A + B) – C * D/E)*(H-I)*F+G and evaluate the obtained postfix expression with following values: A = 4, B = 2, C = 4, D = 3, E = 8, F = 2, G = 3, H =5, I = 1 [1 + 1 + 4 + 4]

10. What is double linked list? How does it differ from circular linked list? Write an algorithm or function to add a node at the beginning and end of double linked list [1 + 1 + 4 + 4]

11. What is heap? Differentiate between min heap and max heap. Sort the following data in ascending order by heap sort method: 2,9,3,12,15,8,11  [2 + 2 + 6]


Data Structure and Algorithm old Question 2019

Group B

Attempt any Six question

2. What is Data Structure? Show the status of stack converting following infix expression to prost fix P + Q – (R*S/T+U)-V*W [1+4].

3. Write binary search. Consider a hash table of size 10; insert the keys 62, 37, 36, 44, 67, 91 and 107 using linear probing. [2+3].

4. What are deterministic and non-deterministic algorithms? Explain greedy algorithm. [3+2]

5. Draw a BST from the string DATASTRUCTURE and traverse the tree in post order and preorder. [3+2]

6. Define circular queue? How does circular queue overcome the limitation of linear queue? Explain. [2+3]

7. What is singly linked list? Write an algorithm to add a node at the beginning and end of singly linked list. [1+4]

8. Define AVL tree. Construct AVL tree from given data set: 4, 6, 12, 9, 5, 2, 13, 8, 3, 7, 11. [2+3]

Group C

Attempt any Two question

9. What is stack? List the applications of stack. Write an algorithm or procedure to perform PUSH and POP operation in stack. [1+2+7]

10. What is heap? Explain quick sort algorithm with Big-oh notation in best case, average case and worst case and trace it to sort the data: 8, 10, 5, 12, 14, 5, 7, 13. [2+2+6]

11. Define graph and tree data structure. Explain breadth first traversal and depth first traversal with example.

Leave a Reply