JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II DATA STRUCTURES Previous Question Paper (November/December - 2018 - R13)
Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit.
PART – A
Define Time and Space Complexity.
Answer
Time Complexity is the amount of computer time required by an algorithm to run as a function of the length of the input. Space Complexity is the amount of memory space required by an algorithm to solve a problem as a function of the input size.
What is data structure? What are the factors that influence the choice of a particular data structure?
Answer
A data structure is a specialized format for organizing, processing, retrieving, and storing data in a computer so that it can be accessed and worked with efficiently. Factors influencing the choice include the nature of the data (frequency of access/updates), the required efficiency of operations (search, insert, delete), and memory constraints.
Differentiate between Dequeue and Priority queue.
Answer
Sign in to view the complete answer paper.
Given the following arithmetic expression in infix notation as 12/(7-3)+2*(3+8)-7. Translate this expression into postfix notation and then evaluate it.
Answer
Sign in to view the complete answer paper.
If there are 27 nodes in a complete binary tree, what will be its height and how many nodes will be in the last level?
Answer
Sign in to view the complete answer paper.
What is the time complexity of DFS traversal as an n-vertex simple graph that is represented with adjacent matrix structure?
Answer
Sign in to view the complete answer paper.
What is hash collision? Explain with an example.
Answer
Sign in to view the complete answer paper.
Compare linear search with binary search.
Answer
Sign in to view the complete answer paper.
What is Trie? Explain the suffix trie with an example.
Answer
Sign in to view the complete answer paper.
What are the properties of B-Tree?
Answer
Sign in to view the complete answer paper.
PART – B
Define Double linked list. Write an algorithm to delete an element from the existing linked list.
Answer
Sign in to view the complete answer paper.
Explain the algorithm specifications and various notations used to analyze the performance of an algorithm.
Answer
Sign in to view the complete answer paper.
Describe the Asymptotic notations with an example.
Answer
Sign in to view the complete answer paper.
Write an algorithm that appends two lists together. Use linked list.
Answer
Sign in to view the complete answer paper.
What is circular queue? Write a C function to insert an item in the circular queue.
Answer
Sign in to view the complete answer paper.
Define stack. Explain the operations of stack with an example.
Answer
Sign in to view the complete answer paper.
Write a C program which converts the infix expression into postfix expression.
Answer
Sign in to view the complete answer paper.
What is Dequeue? Explain the operations of Dequeue with an example.
Answer
Sign in to view the complete answer paper.
Write insertion and deletion algorithm of Max Heap.
Answer
Sign in to view the complete answer paper.
From the following graph find the traversal of nodes using BFS and DFS.
Answer
Sign in to view the complete answer paper.
Explain various graph representations with an example and mention the pros and cons of each representation.
Answer
Sign in to view the complete answer paper.
Construct the Max heap of the following elements {60, 10, 40, 20, 90, 30, 50, 70, 80}
Answer
Sign in to view the complete answer paper.
Write the algorithm for Insertion sort. Explain their best case and worst case complexities.
Answer
Sign in to view the complete answer paper.
Insert the following list of elements into the Hash table by using Quadratic probing (size of the table is 10) {89, 56, 9, 20, 45, 36, 11, 77}
Answer
Sign in to view the complete answer paper.
Sort the following list of elements by using Quick sort, show the contents of the list at the end of each pass. {75, 10, 20, 70, 80, 90, 100, 40, 30, 50}
Answer
Sign in to view the complete answer paper.
Explain the complexity of quick sort algorithm.
Answer
Sign in to view the complete answer paper.
Construct the Splay tree for the following list of elements (Splay node is 89) {22, 55, 6, 7, 66, 49, 3, 34, 67, 56, 89}
Answer
Sign in to view the complete answer paper.
Write algorithms for rotations of an AVL.
Answer
Sign in to view the complete answer paper.
Construct the Red-Black tree for following elements {45, 32, 78, 56, 13, 27, 19, 82, 14}
Answer
Sign in to view the complete answer paper.
Draw the flow chart for KMP algorithm.
Answer
Sign in to view the complete answer paper.