JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech IV DATA STRUCTURES Previous Question Paper (January/February - 2023 - R18)
Note: i) Question paper consists of Part A, Part B.
ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions.
iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.
Part A
Write down the applications of stack.
Answer
Applications of stack include expression evaluation (infix to postfix conversion), function call management (recursion), undo mechanisms in editors, syntax parsing in compilers, and backtracking algorithms.
What are the advantages and disadvantages of the linked list implementation?
Answer
Advantages: Dynamic size allocation, efficient insertion and deletion at any position without shifting elements, and no memory wastage due to pre-allocation. Disadvantages: Extra memory required for pointers, no random access (sequential access only), and poor cache locality compared to arrays.
What is double hashing?
Answer
Sign in to view the complete answer paper.
Write operations on dictionaries.
Answer
Sign in to view the complete answer paper.
List the properties of binary search tree.
Answer
Sign in to view the complete answer paper.
Write the properties of Splay Tree.
Answer
Sign in to view the complete answer paper.
List out the applications of BFS.
Answer
Sign in to view the complete answer paper.
Give the heap sort algorithm. Write the complexity of your algorithm.
Answer
Sign in to view the complete answer paper.
Define Trie? What are the properties of Tries?
Answer
Sign in to view the complete answer paper.
Give the importance preprocessing for Good suffix heuristic.
Answer
Sign in to view the complete answer paper.
Part B
What is the complexity of finding maximum and minimum value from an array of n values? Explain the steps of deriving complexity.
Answer
Sign in to view the complete answer paper.
Distinguish between the stack and the queue data structures.
Answer
Sign in to view the complete answer paper.
Write an algorithm/pseudocode to count the number of nodes in a Singly Linked List?
Answer
Sign in to view the complete answer paper.
Assume that a stack is represented using linked list. Write down the algorithms for the following operations:- (i) Push (ii) Pop.
Answer
Sign in to view the complete answer paper.
What are the properties of a good hash function? With necessary examples explain four different hashing techniques.
Answer
Sign in to view the complete answer paper.
Explain the implementation of skip list representation with an example.
Answer
Sign in to view the complete answer paper.
Given input keys {1, 3, 23, 9, 4, 29, 19} and a hash function h(X) = X mod table size. The initial hash table contains 10 slots, with starting index 0. Show the resulting table after rehashing when the load factor= 0.5, using linear probing.
Answer
Sign in to view the complete answer paper.
Explain the implementation of deletion of new node in dictionary with an example.
Answer
Sign in to view the complete answer paper.
Give an algorithm to perform binary search. Using the algorithm, search for elements 23 and 47 in the given set of elements [12 23 27 35 39 42 50].
Answer
Sign in to view the complete answer paper.
Construct a B-Tree with order m=3 for the key values 2, 3, 7, 9, 5, 6, 4, 8, and 1 delete the values 4 and 6. Show the tree in performing all operations.
Answer
Sign in to view the complete answer paper.
What is a Red-Black Tree? Mention the properties that a Red-Black tree holds.
Answer
Sign in to view the complete answer paper.
Show the results of inserting 43, 11, 69, 72, and 30 into an initially empty AVL tree. Show the results deleting of the node 11 and 72 one after the other from constructed AVL Tree.
Answer
Sign in to view the complete answer paper.
Give algorithm for DFS and demonstrate DFS using suitable example.
Answer
Sign in to view the complete answer paper.
Write an algorithm/ C program to perform merge sort.
Answer
Sign in to view the complete answer paper.
Demonstrate the implementation to do the partition of a list using quick sort and then use insertion sort for sorting sub lists.
Answer
Sign in to view the complete answer paper.
Write an algorithm/pseudocode to sort elements using Heap sort technique? Illustrate the working of Heap sort algorithm on the following input: 35, 15, 0, 1, 60.
Answer
Sign in to view the complete answer paper.
Demonstrate running time analysis of Brute Force String Matching Algorithm using suitable example.
Answer
Sign in to view the complete answer paper.
Discuss in detail about Bad Character Heuristic using suitable example.
Answer
Sign in to view the complete answer paper.
List and demonstrate types of tries with an example.
Answer
Sign in to view the complete answer paper.
Explain about the Boyer- Moore algorithm.
Answer
Sign in to view the complete answer paper.