Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad B.Tech II DATA STRUCTURES Previous Question Paper (March - 2022 - R13)
Answer any five questions
All questions carry equal marks
Main
Explain the concept of asymptotic notations, indicating the normally used notations.
Answer
Asymptotic notations are mathematical tools used to describe the limiting behavior of a function, specifically the growth rate of an algorithm's running time or space requirements as the input size n approaches infinity. They provide a high-level abstraction that ignores machine-dependent constants and lower-order terms to focus on the efficiency class of an algorithm.
The three primary notations are:
- Big O Notation (O): Provides an asymptotic upper bound on the growth rate of a function. It represents the worst-case time complexity, ensuring the algorithm will not perform worse than this limit.
- Omega Notation (Ω): Provides an asymptotic lower bound on the growth rate of a function. It represents the best-case time complexity, ensuring the algorithm will perform at least this well.
- Theta Notation (Θ): Provides an asymptotic tight bound on the growth rate of a function. It occurs when the function is bounded both above and below by the same growth rate, indicating the average or exact complexity.
List out any two applications of linked list and two advantages of doubly linked lists over singly linked list.
Answer
Applications of linked lists include:
- Dynamic Memory Allocation: Linked lists are used to manage free memory blocks in operating systems.
- Implementation of Stacks and Queues: They provide a flexible structure for implementing these data structures where the number of elements is not known in advance.
Advantages of doubly linked lists over singly linked lists:
- Bidirectional Traversal: A doubly linked list allows traversal in both forward and backward directions, whereas a singly linked list only supports forward traversal.
- Efficient Deletion: Deleting a node in a doubly linked list is more efficient if the pointer to the node is already known, as it does not require traversing from the head to find the preceding node to update its pointer.
Explain the insertion and deletion operations in doubly lined list.
Answer
Sign in to view the complete answer paper.
What are the properties of sparse matrix?
Answer
Sign in to view the complete answer paper.
With an example, explain the operations performed on stacks.
Answer
Sign in to view the complete answer paper.
What are the applications of stack?
Answer
Sign in to view the complete answer paper.
Explain various operations that are performed on queue with suitable algorithms.
Answer
Sign in to view the complete answer paper.
Explain about Deque.
Answer
Sign in to view the complete answer paper.
Construct the binary tree whose following traversals are given:
inorder : DFEIHBAJCNOMK
postorder: FIHEDBJONMKCA
Answer
Sign in to view the complete answer paper.
Give the difference between tree and graph.
Answer
Sign in to view the complete answer paper.
Define Max-heap. Write Max-Heapify algorithm that maintain max-heap property.
Answer
Sign in to view the complete answer paper.
Explain about threaded binary tree.
Answer
Sign in to view the complete answer paper.
Construct the open hash table and closed hash table for the input: 30, 20, 56, 75, 31, 19 using the hash function h(k)= k mod 11.
Answer
Sign in to view the complete answer paper.
Explain about insertion sort with an example.
Answer
Sign in to view the complete answer paper.
Discuss Knuth Morries Pratt (KMP) algorithm. Compute whether the pattern P=10100111 is present in the string T=1001010100111 or not.
Answer
Sign in to view the complete answer paper.
Discuss about splay trees.
Answer
Sign in to view the complete answer paper.