DSA Model Question 2

DSA Model Question 2

Published by: Anil K. Panta

Data Structure and Algorithm (DSA)- Model Question 2

Short Question[2x10=20]

1. What is Data Structure?

2. Differentiate between linear and tail recursion.
3. Define stack as ADT.
4. Define priority queue.
5. What is a singly linked list ? Enlist its operation.
6. Define traversing in trees.
7. Define bubble sort with example.
8. What are the good characteristics of a good hash function?
9. Differentiate between directed and undirected graphs.
10. What are the limitations of Big Oh Notations?

Descriptive Question any five [5x10=50]

11. Explain different types of design algorithms along with their advantages and disadvantages.
12. Explain Fibonacci series.Write a recursive algorithm for solving fibonacci series and explain its working along with complexities.
13. Explain stack operations with examples. Convert (A/(B-C)*D+E) into prefix expressions along with its algorithm.
14. Define linked list.Explain all the operations related to linked list with examples.
15. Define Huffman Coding. Given these frequencies is {M: 35, N: 30, O: 20, P: 10, Q: 5} and Perform the following tasks
a. Create the Huffman tree step-by-step.
b. Show how the codes are generated.
c.Calculate the total bits used to encode the data.
d. Compute the average bits per symbol.
16. Explain the concept of divide and conquer algorithm. Hand test Quicksort algorithm with array of numbers (78, 34, 21, 43, 7, 18, 9, 56, 38, 19) along with time complexity.

Analytical Question any Two[2x15=30]

17. Explain Hashing with Open addressing. A hash table with m = 7 slots has the following keys inserted using linear probing: 10,20,15,25,35 The hash function is h(k) = k mod 7. Find the position of the key 25. Determine the number of probs required to search for 15.
18. Explain the queue data structure with its operations and terminology. Write a program to implement enqueue and dequeue in a circular queue.
19. Define graphs. Explain strongly connected and weakly connected graphs. Consider the following weighted graph.
Find the sequence of edges in the MST in the order that Prim’s algorithm includes them. Start Prim’s algorithm from vertex A. Run Dijkstra’s algorithm on the following directed graph, starting at vertex A. What is the order in which vertices get removed from the priority queue? What is the resulting shortest-path tree?

We will get back to you via email or phone call