B.TECH - Semester 4 data structures and algorithms Question Paper 2019 (jun)
Practice authentic previous year university questions for better exam preparation.
Sample Questions
- Differentiate between linear and non-linear data structures.
- An $n \times n$ square matrix $A$ is said to be symmetric if $A[j, k]=A[k, j]$ for all $j$ and $k$. Discuss on efficient way of storing a symmetric matrix in memory.
- Convert the following infix expression to its equivalent prefix and postfix forms $$ A+(B * C-(D / E \uparrow F) * G) * H . $$
- Write an algorithm to count the number of nodes in a binary tree.
- Define the terms - complete graph and connected graph with examples.
- What are reference counters? How do they resolve the problem of dangling pointers?
- Discuss the advantages and disadvantages of using linked list over arrays.
- Explain Collision resolution in hashing.
- Explain heap property with an example.
- Discuss the number of comparisons and interchanges involved in bubble sent, if the input Int is already in sorted order. Answer one full question from each module
- (a) Discuss the different operations that can be performed on a stack data structure.
- (b) Write algorithms to check whether an input string is palindrome or not using (i) a stack (ii) a queue. OR
- (a) Write an algorithm to convert an infix expression to its equivalent postfix expression and evaluate it.
- (b) Evaluate the following postfix expression by showing the context of stack at each step 12, 7, 3, -, /, 2, 1, 5, +, *, *.
- (a) Suppose the following eight numbers are inserted into an exmpty binary search tree $-50,33,44,22,77,35,60,40$
- (i) Draw the tree (ii) Perform preorder and post order traversals on the tree (iii) Find the height of the tree (iv) Show the deletion of nodes 35 and 33 and draw the resulting tree.
- (b) What do you mean by storage compaction? Explain one algorithm for storage compactors. OR
- (a) Explain DFS algorithm. Illualvate the working of the algorithm on a directed complete graph with 5 vertices and 6 edges.
- (b) Write algorithms to perform
- (i) Insertion into a single linked list so- that the resultant list would be sorted one. (ii) Count the number of nodes in a circular linked list.
- (a) Write the algorithm for heapsert. Illustrate the working of the algorithm on the following set of numbers. $42,23,74,11,65,58$.
- (b) Discuss the different hashing techniques.
- (a) Write the algorithm for mergesnt. Illustrate its working on a set of 7 numbers.
- (b) Explain any one external sorting method.