Data Structures and Algorithms – Previous Year Questions
215 questions from past UGC NET Paper 2 – Computer Science papers, each with the correct answer. Open any question for its explanation.
- Match List - I with List - II. List - I List - II A. Merge sort I. n² B. Binary search II. nlogn C. Quick sort III. n D. Search in an unsorted array IV. logn Choose the correct answer from the options given below:
- Consider the following AVL tree: root = 60; left child of 60 = 50; right child of 60 = 70; right child of 70 = 80 (a balanced AVL tree of height 2). What is the maximum number of nodes that can be inserted in the follow…
- In the worst case, the smallest number of comparisons required by any sorting algorithm, which does only binary comparisons, is
- A problem of size n requires n² bit operations. What is the largest size instance that can be solved in 1 second, if each bit operation is carried out in 10⁻⁹ second?
- If f(n) = θ(g(n)) and g(n) = O(h(n)), then which of the following is true?
- The number of leaf nodes in a full 4-ary rooted tree of n nodes is
- Which of the following statements maybe false for a decision problem X ∈ NP?
- A binary search tree is obtained by inserting the words "Mathematics", "Physics", "Geography", "Zoology", "Metrology", "Geology", "Psychology" and "Chemistry" in order. Words are compared by dictionary order. Arrange th…
- In open addressing, how are collisions typically resolved?
- What is the height of the binary search tree obtained by inserting the numbers 40, 60, 50, 37, 52, 15, 8, 22 in the given order
- Match the LIST-I with LIST-II. LIST-I (Data structure) LIST-II (Characteristics) A. Stack I. First-In-First-Out (FIFO) order B. Queue II. Last-In-First-Out (LIFO) order C. Linked list III. Nodes with two children ordere…
- How will the following min-heap appear on inserting the key 32? Original min-heap (level order): 5, 10, 25, 30, 40, 50, 60, 70, 80, 90 (root 5; children of 5 are 10 and 25; children of 10 are 30 and 40; children of 25 a…
- Consider the infix expression Q : ((A + B) ∗ D) ↑ (E − F). The equivalent postfix expression of Q is
- Which of the following trees are height balanced? A. Binary Search Tree B. AVL Tree C. Red-Black Tree D. B Tree Choose the correct answer from the options given below:
- Which of the following algorithms use the Greedy strategy? A. Dijkstra's algorithm B. Kruskal's algorithm C. Huffman coding D. Bellman-Ford algorithm Choose the correct answer from the options given below:
- The longest common subsequence of {1,2,3,2,4,1,2} and {2,4,3,1,2,1} is
- Match List I (Hashing Collision Handling Method) with List II (Strategy)List I List II A. Chaining I. Check next slot B. Linear Probing II. Use the second hash function C. Quadratic Probing III. Linked list at index D.…
- Maintaining a graph in memory by means of its adjacency matrix is known as
- Match List I with List IIList I List II A. Circular Queue I. Print Queue B. Priority Queue II. CPU Scheduling C. Double Ended Queue III. Dijkstra algorithm D. Simple Queue IV. Palindrome checking
- The tight asymptotic bound for the recurrence T(n) = 2T(n/4) + √n is
- When developing a dynamic programming algorithm, the sequence of steps followed is: A. Construct an optimal solution from computed information. B. Recursively define the value of an optimal solution. C. Characterize the…
- The correct sequence of constructing a Huffman tree is A. Repeat until root formed B. Create leaf nodes C. Build priority queue D. Combine lowest frequency nodes Choose the correct answer from the options given below:
- Choose the correct statement(s) A. A problem which is NP-Complete will have the property that it can be solved in polynomial time iff all other NP-complete problems can also be solved in polynomial time. B. All NP-compl…
- Consider the binary tree: A is the root with left child B and right child C; C has left child D and right child E; E has right child F; F has left child G and right child H. What will be the inorder traversal?
- Which of the following uses only increment operations for adding and removing elements at either end?
- Match List I with List IIList I List II A. Breadth First Search I. LISP B. Depth First Search II. Syntax tree C. Prefix III. Stack D. Infix IV. Queue
- Which of the following is NOT a divide and conquer method?
- Arrange the following steps of the inorder traversal of a binary tree in the correct order. A. Visit the left subtree B. Visit the root node C. Visit the right subtree D. Start traversing by visiting the nodes in the ro…
- Which of the following algorithms are based on Breadth First Search (BFS)? A. Prim's algorithm B. Kruskal's algorithm C. Dijkstra's algorithm D. Greedy algorithms E. Dynamic Programming Choose the correct answer from th…
- Which of the following is the solution of the recurrence relation T(n) = T(2n/3) + 1?