UGC NET · PAPER 2
UGC NET Paper 2 Computer Science – Unit 7: Data Structures and Algorithms PYQ (December 2023)
Q2. Which of the following is NOT a palindromic subsequence of the string "ababcdabba"?
- abcba
- abba
- abbbba
- adba
Q3. Which of the following is TRUE?
- The cost of searching an AVL tree is Θ(log n) but that of a binary search tree is O(n)
- The cost of searching an AVL tree is Θ(log n) but that of a complete binary tree is Θ(n log n)
- The cost of searching a binary tree is O(log n) but that of an AVL tree is Θ(n)
- The cost of searching an AVL tree is Θ(n log n) but that of a binary search tree is O(n)
Q4. What is the result of evaluating the postfix expression "4 3 * 2 5 * + 8 -"?
- 8
- 14
- 10
- 5
Q25. Which data structure is typically used to implement a hash table?
- Linked list
- Array
- Binary tree
- Stack
Q26. Which collision resolution technique involves maintaining a linked list of collided keys?
- Linear probing
- Quadratic probing
- Chaining
- Double hashing
Q27. Consider the following functions: f(n) = 3n√n, g(n) = 2√n log₂ n, h(n) = n!. Which of the following is true?
- h(n) is O(f(n))
- h(n) is O(g(n))
- g(n) is not O(f(n))
- f(n) is O(g(n))
Q28. 2-3-4 trees are B-trees of order 4. They are isometric to ______ trees.
- AVL
- AA
- 2-3
- Red-Black