JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II Year DATA STRUCTURES Previous Question Paper (May/June - 2019 - R15)
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. Each question carries 10 marks and may have a, b, c as sub questions.
Part A
(25 Marks)
Explain the properties of an algorithm.
Answer
An algorithm must satisfy the following fundamental properties:
- Input: Zero or more quantities are externally supplied to the algorithm.
- Output: At least one quantity is produced as a result.
- Definiteness: Each instruction must be clear, unambiguous, and precise.
- Finiteness: The algorithm must terminate after a finite number of steps for all cases.
- Effectiveness: Every instruction must be basic enough to be carried out exactly and in a finite amount of time by a person or machine.
Distinguish between linear and non linear data structures.
Answer
Linear and non-linear data structures differ primarily in the way elements are organized and traversed:
- Linear Data Structures: Elements are arranged in a sequential or linear order where each element has a unique predecessor and successor (except the first and last). Examples include arrays, linked lists, stacks, and queues. They are easy to implement and traverse in a single run.
- Non-linear Data Structures: Elements are arranged in a hierarchical or interconnected manner where one element can be connected to multiple other elements. Examples include trees and graphs. These structures are more complex to implement and traverse, often requiring recursive algorithms or specific search techniques like BFS or DFS.
What are the disadvantages of queue which is implemented using array and how to overcome it.
Answer
Sign in to view the complete answer paper.
Write a program to check whether a given string is palindrome or not using stack.
Answer
Sign in to view the complete answer paper.
Explain the tree traversals with an example.
Answer
Sign in to view the complete answer paper.
Write a function in C to insert an element into a binary search tree.
Answer
Sign in to view the complete answer paper.
Explain hash collision.
Answer
Sign in to view the complete answer paper.
Distinguish between Insertion sort and Selection sort.
Answer
Sign in to view the complete answer paper.
Explain the properties of B-tree.
Answer
Sign in to view the complete answer paper.
Write a function of rotations of AVL tree.
Answer
Sign in to view the complete answer paper.
Part B
(50 Marks)
Write a function to count the number of nodes in a singly linked list.
Answer
Sign in to view the complete answer paper.
What are the advantages and disadvantages of representing a stack or queue by a linked list?
Answer
Sign in to view the complete answer paper.
Write a function to concatenates two circular singly linked lists.
Answer
Sign in to view the complete answer paper.
Explain the Asymptotic notations with an example.
Answer
Sign in to view the complete answer paper.
Write a program to convert infix expression to postfix expression.
Answer
Sign in to view the complete answer paper.
Explain the applications of circular queue.
Answer
Sign in to view the complete answer paper.
Explain the operations of Dequeue with an example.
Answer
Sign in to view the complete answer paper.
Write an algorithm to reverse a string using stack.
Answer
Sign in to view the complete answer paper.
Explain the different techniques used to represent a graph in computer memory.
Answer
Sign in to view the complete answer paper.
Write a function to delete an element from the Heap.
Answer
Sign in to view the complete answer paper.
Construct the binary tree of the following data: 25, 30, 10, 9, 62, 5, 18, 43, 53
Answer
Sign in to view the complete answer paper.
Explain the Graph traversals with an example.
Answer
Sign in to view the complete answer paper.
Explain how the choice of pivot element affects the running time of quick sort algorithm.
Answer
Sign in to view the complete answer paper.
Insert the following elements into the hash table by using Quadratic probing (size of the hash table 10) 30, 45, 28, 65, 26, 77, 40, 11
Answer
Sign in to view the complete answer paper.
Sort the following list of elements by using Heapsort: 35, 48, 20, 80, 22, 36, 100, 5, 15
Answer
Sign in to view the complete answer paper.
Write a program to implement the binary search.
Answer
Sign in to view the complete answer paper.
Construct the Red-Black tree of the following data: 40, 25, 10, 60, 55, 70, 100, 15, 28
Answer
Sign in to view the complete answer paper.
Write an algorithm of KMP.
Answer
Sign in to view the complete answer paper.
Write an algorithm to delete an element from the binary search tree.
Answer
Sign in to view the complete answer paper.
Construct the B-Tree of order 4 of the following data: 20, 30, 40, 15, 18, 16, 50, 25, 9, 17, 10
Answer
Sign in to view the complete answer paper.