levo

Stacks, Queues, Linked Lists and Trees

Binary trees: nodes, roots and leaves

  • 3 things to know
  • Component 1

Overview

Root of a tree, leaf node and binary tree.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What is a tree?

Key term

What is the root of a tree?

Key term

What is a leaf node?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is a tree?

    Model answer

    A tree is a hierarchical structure of nodes joined by branches. Every node except the root has exactly one parent.

  2. 2

    What is the root of a tree?

    Model answer

    The root is the single node at the top of the tree with no parent. Every other node is reached by following branches from the root.

  3. 3

    What is a leaf node?

    Model answer

    A leaf node is a node with no children. The branches of the tree come to an end at leaf nodes.

  4. 4

    What is a binary tree?

    Model answer

    A binary tree allows each node at most two children. The children are known as the left child and the right child.

  5. 5

    What is a binary search tree?

    Model answer

    A binary search tree keeps smaller keys in the left subtree and larger keys in the right subtree. The ordering rule holds at every node.

  6. 6

    Describe how a new value is added to a binary search tree.

    Model answer

    The new value is compared with the root and follows the left or right branch accordingly. The comparison repeats until an empty position is found.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

See a huge jump in your memorisation

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Data Structures: Arrays, Records and Hash Tables
Stacks, Queues, Linked Lists and Trees
Boolean Logic and Simplification
Algorithms, Pseudo-Code and Programming Constructs

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

KDW to HAT.
decryptsencryptscompresses

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

AThe two are not the same.
BOpen source refers to the availability of the code.
CMuch open source software is free of charge.

Build It trains answer structure

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

Backup means the copy of the data.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Stacks, Queues, Linked Lists and Trees, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.