Tree

Computer Science and Engineering > Data Structure

This set of multiple choice questions (MCQs) covers various concepts related to trees in data structure. Test your knowledge and improve your understanding of binary trees, binary search trees, AVL trees, red-black trees, and more. ➲ Tree - Quiz


  • A A tree with at most two children per node
  • B A tree with three children per node
  • C A tree with four children per node
  • D A tree with any number of children per node
  • A The node with no children
  • B The node with only one child
  • C The node at the top of the tree
  • D The node at the bottom of the tree
  • A The node with no children
  • B The node with only one child
  • C The node at the top of the tree
  • D The node at the bottom of the tree
  • A A tree with at most two children per node
  • B A tree with three children per node
  • C A tree with four children per node
  • D A tree with any number of children per node
  • A O(log n)
  • B O(n)
  • C O(n log n)
  • D O(1)
  • A A tree in which each node has at most one child
  • B A tree in which each node has exactly two children
  • C A tree in which the difference in height between the left and right subtrees of any node is at most 1
  • D A tree in which the difference in height between the left and right subtrees of any node is at most 2
  • A A type of binary search tree
  • B A data structure used for storing associative arrays where the keys are strings
  • C A data structure used for storing graphs
  • D A data structure used for storing sets
  • A A type of binary search tree
  • B A data structure used for storing associative arrays where the keys are strings
  • C A data structure used for storing graphs
  • D A data structure used for storing sets and can be used to implement priority queues
  • A A tree in which each node has at most one child
  • B A tree in which each node has exactly two children
  • C A self-balancing binary search tree in which the difference in height between the left and right subtrees of any node is at most 1
  • D A self-balancing binary search tree in which the difference in height between the left and right subtrees of any node is at most 2
  • A A tree in which each node has at most one child
  • B A tree in which each node has exactly two children
  • C A self-balancing binary search tree in which each node is colored either red or black
  • D A self-balancing binary search tree
  • A A binary tree in which every node has either one or two children
  • B A binary tree in which every node has exactly two children
  • C A binary tree in which every node has at most two children
  • D A binary tree in which every node has at least two children
  • A A binary tree in which every node has either one or two children
  • B A binary tree in which every node has exactly two children
  • C A binary tree in which all leaf nodes are at the same level and every non-leaf node has two children
  • D A binary tree in which all leaf nodes are at the same level and every non-leaf node has either one or two children
  • A Visiting the root node, then the left subtree, then the right subtree
  • B Visiting the left subtree, then the root node, then the right subtree
  • C Visiting the left subtree, then the right subtree, then the root node
  • D Visiting the right subtree, then the root node, then the left subtree
  • A Visiting the root node, then the left subtree, then the right subtree
  • B Visiting the left subtree, then the root node, then the right subtree
  • C Visiting the left subtree, then the right subtree, then the root node
  • D Visiting the right subtree, then the root node, then the left subtree
  • A A binary search tree that does not require any balancing
  • B A binary search tree that is always perfectly balanced
  • C A binary search tree that automatically re-balances itself to maintain its height and ensure fast operations
  • D A binary search tree that allows unbalanced nodes to remain unbalanced
  • A A binary tree that allows for easy traversal of its nodes without requiring a stack or queue
  • B A binary tree in which every node has exactly two children
  • C A binary tree that uses threads (pointers to other nodes) to connect certain nodes, making traversal faster
  • D A binary tree that is not binary search tree
  • A A binary search tree that can have more than two children per node
  • B A binary tree in which every node has exactly two children
  • C A self-balancing binary search tree that maintains a height difference of at most 1 between subtrees
  • D A binary search tree that does not allow duplicates
  • A Insertion
  • B Deletion
  • C Searching for a value
  • D All of the above
  • A A binary search tree
  • B A red-black tree
  • C A B-tree
  • D A prefix tree