Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 4 MCQs Trees and Recursion

CSE205 — Data Structures And Algorithms 50 questions. Pick an option to check it.

Read the notes

0 of 50 answered 0 right 0 wrong , 50 left

  1. Question 1 of 50

    In a binary tree, what is the maximum number of children a node can have?

  2. Question 2 of 50

    What is a Complete Binary Tree?

  3. Question 3 of 50

    In an Extended Binary Tree (2-tree), nodes that replace NULL pointers in the original tree are called:

  4. Question 4 of 50

    What is the maximum number of nodes in a binary tree of height 'h' (where the root is at height 1)?

  5. Question 5 of 50

    If a binary tree has 'n' nodes, how many edges does it have?

  6. Question 6 of 50

    When representing a binary tree using an array (sequential representation) with the root at index 0, what is the index of the left child of the node at index 'i'?

  7. Question 7 of 50

    When representing a binary tree using an array with the root at index 0, what is the index of the right child of the node at index 'i'?

  8. Question 8 of 50

    Which memory representation is most memory-efficient for a skewed binary tree?

  9. Question 9 of 50

    In the linked representation of a binary tree, a node structure typically contains:

  10. Question 10 of 50

    Which traversal visits the root first, then the left subtree, then the right subtree?

  11. Question 11 of 50

    Which traversal visits the left subtree, then the root, then the right subtree?

  12. Question 12 of 50

    Which traversal visits the left subtree, then the right subtree, then the root?

  13. Question 13 of 50

    What is the In-order traversal of a tree with Root A, Left Child B, and Right Child C?

  14. Question 14 of 50

    Which traversal is useful for deleting nodes in a binary tree (freeing memory)?

  15. Question 15 of 50

    Performing an In-order traversal on a Binary Search Tree (BST) results in:

  16. Question 16 of 50

    To reconstruct a unique binary tree, which combination of traversals is sufficient?

  17. Question 17 of 50

    What is the primary property of a Binary Search Tree (BST)?

  18. Question 18 of 50

    What is the worst-case time complexity for searching in a Binary Search Tree?

  19. Question 19 of 50

    What is the best-case time complexity for searching in a Binary Search Tree?

  20. Question 20 of 50

    When inserting a new node into a BST, the new node is always inserted as:

  21. Question 21 of 50

    Which node has the minimum value in a Binary Search Tree?

  22. Question 22 of 50

    When deleting a node with two children in a BST, which node can replace it to maintain the BST property?

  23. Question 23 of 50

    What defines a 'base case' in recursion?

  24. Question 24 of 50

    What happens if a recursive function does not have a base case?

  25. Question 25 of 50

    The Towers of Hanoi problem with 'n' disks requires a minimum of how many moves?

  26. Question 26 of 50

    In the recursive solution to Towers of Hanoi, how many recursive calls are made to move n-1 disks?

  27. Question 27 of 50

    What data structure is implicitly used by the system to handle recursion?

  28. Question 28 of 50

    Which sorting algorithm uses the 'Divide and Conquer' strategy and merges two sorted subarrays?

  29. Question 29 of 50

    What is the time complexity of Merge Sort in the worst case?

  30. Question 30 of 50

    Which of the following is a disadvantage of Merge Sort compared to Quick Sort?

  31. Question 31 of 50

    Quick Sort uses which element to partition the array?

  32. Question 32 of 50

    What is the worst-case time complexity of Quick Sort?

  33. Question 33 of 50

    In Quick Sort, if the partition is always balanced (splits array in half), the time complexity is:

  34. Question 34 of 50

    Which sorting algorithm is generally considered the fastest in practice (average case) for arrays?

  35. Question 35 of 50

    Is Merge Sort a stable sorting algorithm?

  36. Question 36 of 50

    What does 'Tail Recursion' mean?

  37. Question 37 of 50

    In a binary tree, a node with no children is called a:

  38. Question 38 of 50

    The height of a binary tree with only a root node is:

  39. Question 39 of 50

    If a Binary Search Tree is created from the sequence [10, 5, 20, 3, 7], which node is the left child of 5?

  40. Question 40 of 50

    Which data structure concept is Towers of Hanoi primarily used to illustrate?

  41. Question 41 of 50

    In Quick Sort, what happens during the 'partition' step?

  42. Question 42 of 50

    Merge Sort on a Linked List can be implemented with:

  43. Question 43 of 50

    The traversal sequence 4, 2, 5, 1, 3 is obtained from a tree. If this is an In-order traversal and the Root is 1, what is the Left Subtree?

  44. Question 44 of 50

    In a recursive function, the set of local variables is stored in a:

  45. Question 45 of 50

    Which of the following is true about Quick Sort regarding stability?

  46. Question 46 of 50

    Which traversal is equivalent to a Depth First Search (DFS) on a tree?

  47. Question 47 of 50

    What is the space complexity of the recursive implementation of Post-order traversal?

  48. Question 48 of 50

    If the Pre-order traversal is AB and In-order traversal is BA, what is the structure of the binary tree?

  49. Question 49 of 50

    Which operation is NOT supported efficiently by a standard Binary Search Tree?

  50. Question 50 of 50

    In the context of recursion, what is 'Indirect Recursion'?

That's unit 4

Answer a few questions and your score shows up here.