JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III DATA STRUCTURES Previous Question Paper (July - 2023 - R16)
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
What is the time complexity of linear loop and quadratic loop?
Answer
The time complexity of a linear loop is O(n), where n is the number of iterations. The time complexity of a quadratic loop (a nested loop where both loops depend on n) is O(n2).
Give the classification of data structures.
Answer
Data structures are primarily classified into two categories:
- Linear Data Structures: Elements are arranged in a sequential order (e.g., Arrays, Linked Lists, Stacks, and Queues).
- Non-Linear Data Structures: Elements are arranged in a hierarchical or interconnected manner (e.g., Trees and Graphs).
What are the advantages of circular queues compared with linear queue?
Answer
Sign in to view the complete answer paper.
Convert the following infix expression into postfix expression: A+B*C/D+E-F+G
Answer
Sign in to view the complete answer paper.
Define Max Priority queue.
Answer
Sign in to view the complete answer paper.
Define tree, binary tree and heap tree.
Answer
Sign in to view the complete answer paper.
Compare linear search and binary search.
Answer
Sign in to view the complete answer paper.
Write the time complexity of selection sort, Quick sort and Radix sort.
Answer
Sign in to view the complete answer paper.
Define Red-Black Tree and Splay Tree.
Answer
Sign in to view the complete answer paper.
Construct the binary search tree using the following traversal sequences. Inorder Traversal: 10 20 30 100 150 200 300; Preorder Traversal: 100 20 10 30 200 150 300
Answer
Sign in to view the complete answer paper.
Part B
Write a function to delete an element from the front of the linked list.
Answer
Sign in to view the complete answer paper.
Write an algorithm to insert an element at the front of doubly linked list.
Answer
Sign in to view the complete answer paper.
Write a function to print transpose of a sparse matrix.
Answer
Sign in to view the complete answer paper.
Write a function to concatenate two singly linked lists.
Answer
Sign in to view the complete answer paper.
Write the program to implement operations of stack using linked lists.
Answer
Sign in to view the complete answer paper.
Explain insert and delete operations of circular queue.
Answer
Sign in to view the complete answer paper.
Write the program to implement operations of queue using arrays.
Answer
Sign in to view the complete answer paper.
Write the program to evaluate the postfix expression.
Answer
Sign in to view the complete answer paper.
Write a procedure to insert an element into binary tree.
Answer
Sign in to view the complete answer paper.
Write the traversal sequences of the following Graph using BFS and DFS.
Answer
Sign in to view the complete answer paper.
Write a function to perform delete operation in max heap.
Answer
Sign in to view the complete answer paper.
Write functions to perform the following operations of binary tree: i) pre order traversal ii) in order traversal.
Answer
Sign in to view the complete answer paper.
What is hashing? How hashing can used to insert and search elements into a hash table.
Answer
Sign in to view the complete answer paper.
Write a program to implement selection sort.
Answer
Sign in to view the complete answer paper.
Write a program to perform quick sort.
Answer
Sign in to view the complete answer paper.
Write a program to search for an element using linear search.
Answer
Sign in to view the complete answer paper.
Write a function to delete an element from a binary search tree.
Answer
Sign in to view the complete answer paper.
Explain various rotations of the Red-Black tree.
Answer
Sign in to view the complete answer paper.
Write the process to insert and delete an element in AVL Tree.
Answer
Sign in to view the complete answer paper.
Explain the procedure to delete an element from B-Tree.
Answer
Sign in to view the complete answer paper.