JNTU
JNTU B.Tech II DATA STRUCTURES Previous Question Paper (April/May - 2023 - R18)
Question paper consists of Part A, Part B. Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. In Part B, Answer any one question from each unit. Each question carries 10 marks.
Part A
Give examples for stack.
Answer
Common examples include the undo mechanism in text editors, the back button in web browsers, and the function call stack used for managing recursive function calls and local variables in programming.
How to construct a queue using stacks?
Answer
A queue can be constructed using two stacks, say Stack1 and Stack2. To enqueue, push the element onto Stack1. To dequeue, if Stack2 is empty, pop all elements from Stack1 and push them into Stack2, then pop from Stack2. If Stack2 is not empty, simply pop from Stack2.
What is a skip list?
Answer
Sign in to view the complete answer paper.
List the drawbacks of open addressing.
Answer
Sign in to view the complete answer paper.
What does the color notate in red-black tree?
Answer
Sign in to view the complete answer paper.
What operations are performed on Splay trees?
Answer
Sign in to view the complete answer paper.
What is a max heap?
Answer
Sign in to view the complete answer paper.
Give example for adjacency list of a graph.
Answer
Sign in to view the complete answer paper.
Define trie.
Answer
Sign in to view the complete answer paper.
What are the merits and demerits of brute force method for pattern matching?
Answer
Sign in to view the complete answer paper.
Part B
Write and explain algorithms for Push and pop operations of stack using linked list.
Answer
Sign in to view the complete answer paper.
Describe the conditions of overflow and underflow in a queue.
Answer
Sign in to view the complete answer paper.
Discuss the applications of queues.
Answer
Sign in to view the complete answer paper.
Demonstrate skip list representation of a dictionary.
Answer
Sign in to view the complete answer paper.
How to perform reassign operation on a dictionary.
Answer
Sign in to view the complete answer paper.
Explain the algorithm for implementing quadratic probing on a hash table.
Answer
Sign in to view the complete answer paper.
Illustrate search operation on binary search tree.
Answer
Sign in to view the complete answer paper.
Discuss the importance of height balanced trees for searching.
Answer
Sign in to view the complete answer paper.
With suitable examples, illustrate right-left rotation on AVL tree.
Answer
Sign in to view the complete answer paper.
Differentiate between splay tree and red-black tree.
Answer
Sign in to view the complete answer paper.
Make a comparison of breadth first search and depth first search for a graph.
Answer
Sign in to view the complete answer paper.
Write an algorithm for merge sort and explain with a suitable example.
Answer
Sign in to view the complete answer paper.
Describe the Knuth-Morris-Pratt algorithm for pattern matching.
Answer
Sign in to view the complete answer paper.
āA compressed trie is an advanced version of the standard trie.ā Support or oppose this statement with necessary explanation.
Answer
Sign in to view the complete answer paper.