Tree Data Structure MCQs

Tree Data Structure MCQs

Tree Data Structure MCQs

  1. The number of edges from the node to the deepest leaf is called of the tree
  2. (a) Height
    (b) Depth
    (c) Length
    (d) Width

    (a) Height

  3. What is a full binary tree?
  4. (a) Each node has exactly zero or two children
    (b) Each node has exactly two children
    (c) All the leaves are at the same level
    (d) Each node has exactly one or two children

    (a) Each node has exactly zero or two children

  5. What is a complete binary tree?
  6. (a) Each node has exactly zero or two children
    (b) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from right to left
    (c) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right
    (d) A tree In which all nodes have degree 2

    (c) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right

  7. State true of false.i) A node is a parent if it has successor nodes.i) A node is child node if out degree is one.
  8. (a) True, True
    (b) True, False
    (b) False, True
    (c) False, False

    (b) True, False

  9. How many types of insertion are performed in a binary tree?*
  10. (a) 1
    (b) 2
    (c) 3
    (d) 4

    (b) 2

  11. The node which has no children is called as
  12. (a) Root Node
    (b) Leaf Node
    (c) Parent Node
    (d) Internal Node

    (b) Leaf Node

  13. The children of same parent node is called as:
  14. (a) Siblings
    (b) Parent Node
    (c) Root Node
    (d) None

    (a) Siblings

  15. The tree which has n vertices, then how many edges are there?
  16. (a) n-1
    (b) n-2
    (c) n
    (d) n2

    (a) n-1

  17. In a skewed binary tree, all nodes except one have only one child node. The remaining node has no child
  18. (a) True
    (b) False

    (a) True

  19. A Tree is:
  20. (a) Linear Data Structure
    (b) Non Linear Data Structure

    (b) Non Linear Data Structure

  21. Which of the following statement is not true?
  22. (a) A tree contains a cycle
    (b) A tree is a connected graph
    (c) A tree with n nodes contains n-1 edges
    (d) None

    (a) A tree contains a cycle

  23. The number of edges from the root node to the deepest leaf is called of the tree.
  24. (a) Height
    (b) Depth
    (c) Length
    (d) Width

    (a) Height

  25. Which of the following statement about binary tree is True?
  26. (a) Every binary tree is either complete or full
    (b) Every Complete binary tree is also a full binary tree
    (c) Every full binary tree is also a complete binary tree
    (d) A binary tree cannot be both complete and full

    (c) Every full binary tree is also a complete binary tree

  27. Which of the following traversal technique outputs the data in sorted order in a Binary Search Tree (BST) ?
  28. (a) Preorder
    (b) Inorder
    (c) Postorder
    (d) Level order

    (b) Inorder

  29. Which of the following tree traversal technique visits root node last?
  30. (a) Preorder
    (b) Inorder
    (c) Postorder
    (d) Level order

    (c) Postorder

  31. Which of the following is not a height balanced tree?
  32. (a) AVL Trees
    (b) Binary Heap Tree
    (c) BST
    (d) None Of The Above

    (c) BST

  33. What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
  34. (a) O(logn) for both insertion and deletion
    (b) O(n) for both insertion and deletion
    (c) O(n) for insertion and O(logn) for deletion
    (d) O(logn) for insertion and O(n) for deletion

    (b) O(n) for both insertion and deletion

  35. A binary tree T has n leaf nodes. The number of nodes of degree 2 in T is
  36. (a) log2n
    (b) n-1
    (c) n
    (d) 2n

    (b) n-1

  37. Which of the following is not an advantage of trees?
  38. (a) Hierarchical structure
    (b) Faster search
    (c) Router algorithms
    (d) Undo/Redo operations ia notepad

    (d) Undo/Redo operations ia notepad

  39. In full binary tree ij number of internal nodes isL,then number of nodes Nare?
  40. (a) N = 2*1
    (b) N =I+1
    (c) N =1-1
    (d) N 2*1 +1

    (d) N 2*1 +1

  41. What is a complete binary tree?
  42. (a) Each node has exactly zero or two children
    (b) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from right to left
    (c) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right
    (d) A tree in which all nodes have degree 2

    (c) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right

  43. What is the average case time complexity for finding the height of the binary tree?
  44. (a) h = O(loglogn)
    (b) h = O(nlogn)
    (c) h = O(n)
    (d) h = O(log n)

    (d) h = O(log n)

  45. which of the following is not an advantage of trees?
  46. (a) Hierarchical structure
    (b) Faster search
    (c) Router algorithms
    (d) Undo/Redo operations in a notepad

    (d) Undo/Redo operations in a notepad

  47. what is the maximum number of leaves in a binary tree of height h
  48. (a) 2h−1
    (b) h−1
    (c) h
    (d) 1

    (a) 2h−1

  49. The number of edges from the node to the deepest leaf is called ________ of the tree.
  50. (a) Height
    (b) Depeath
    (c) Length
    (d) Width

    (a) Height

  51. how many children does a binary tree have?
  52. (a) two children
    (b) three children
    (c) No children
    (d) Unlimited children

    (a) two children

Tree Data Structure MCQs
Related Topics

Post a Comment

To be published, comments must be reviewed by the administrator.

أحدث أقدم