Lesson 4.2.5.1

4.2.5.1 Trees and binary trees Quiz: AQA Computer Science, Unit 2

20 questions

In partnership with Revision Ninja

Lesson 4.2.5.1, Trees and binary trees: 20 multiple choice questions for the AQA Computer Science (7517), Unit 2: Fundamentals of data structures, written with Revision Ninja.

Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.

Host this setFree Play

The 20 questions

  1. Which term describes a connected, undirected graph with no cycles?

    • Hash table
    • Tree
    • Queue
    • Linked list
  2. What type of tree has one designated top vertex with parent-child relationships?

    • Binary search tree
    • Rooted tree
    • Balanced tree
    • Unrooted graph
  3. In a rooted tree, which node has no parent?

    • Every node
    • A leaf
    • The root
    • Any internal node
  4. What is the maximum number of child nodes any node can have in a binary tree?

    • 3
    • 1
    • Unlimited
    • 2
  5. A tree has 9 nodes, with one root and every other node having exactly one parent. How many edges does it have?

    • 7
    • 8
    • 9
    • 10
  6. In a binary search tree containing 8, where is the smaller value 3 placed?

    • Root node
    • Left child
    • Parent node
    • Right child
  7. Which traversal order visits the nodes of a binary search tree in ascending order?

    • In-order traversal
    • Pre-order traversal
    • Breadth-first traversal
    • Post-order traversal
  8. What name is given to a tree node that has zero children?

    • Parent node
    • Branch node
    • Leaf node
    • Root node
  9. Which structure is typically represented using a rooted tree data structure?

    • Web page network
    • Directory file system
    • Processor registers
    • Hash map table
  10. A binary tree has a root with two children and each child has none. What is the height of this tree if the height counts levels?

    • 2
    • 1
    • 3
    • 0
  11. Must a general graph-theory tree contain a designated root node?

    • No
    • Only if directed
    • Yes
    • Only if weighted
  12. Values 5, 2, 8, 1 are inserted into a BST. What is the right child of 2?

    • 1
    • 5
    • 8
    • None
  13. In a rooted tree, what relationship does a node directly above another node have?

    • Ancestor
    • Parent
    • Sibling
    • Child
  14. A complete binary search tree with 7 nodes has how many levels?

    • 2
    • 3
    • 7
    • 4
  15. Besides its data value, what does a binary tree node store pointers to?

    • Every sibling node
    • All graph vertices
    • All ancestor nodes
    • Two child nodes
  16. Which graph feature prevents an undirected, connected graph from being a tree?

    • An edge
    • A root
    • A cycle
    • A leaf
  17. A tree with 15 nodes is a full binary tree with all levels filled. How many levels does it have?

    • 5
    • 3
    • 4
    • 15
  18. What average time complexity is achieved when searching a balanced binary search tree?

    • O(log n)
    • O(n)
    • O(1)
    • O(n^2)
  19. What term is given to a node in a tree that has no children?

    • Root node
    • Leaf node
    • Parent node
    • Internal node
  20. What is the maximum number of children any node in a binary tree can have?

    • 1
    • 2
    • Unlimited
    • 3

All AQA Computer Science quizzes