WJEC A-Level Computer Science 601-5345-3
Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types
Data Structures
Organisation of Data: Files and Records
Database Systems
The Operating System
Algorithms and Programs
Principles of Programming
Systems Analysis
Software Engineering and Program Construction
Types of Software System
Practical Programming
Data Security and Integrity
Computing, Society and the Law
Advanced Data Structures and Logic
Recursion, Sorting and Searching
Programming Paradigms and Translators
System Design and Human-Computer Interaction
Software Engineering Tools and Professional Practice
Advanced Architecture and Assembly Language
Communication Networks and File Organisation
Number Representation and Floating Point
Databases and Distributed Systems
Operating System Management
Software Systems and Applications
Data Security, Cryptography and Attack
Advanced Data Structures and Logic
Binary trees using pointers and arrays
- 3 things to know
- A2 Unit 3
Overview
Binary tree, root of a tree and leaf node.
What you need to know
Answer each one before you reveal it.
Define the root of a tree.
What is a leaf node?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a binary tree?
Model answer
A binary tree is a structure of nodes in which every node has at most two children, referred to as its left child and its right child.
- 2
Define the root of a tree.
Model answer
The root is the single node that has no parent, and it is the node from which every other node is reached.
- 3
What is a leaf node?
Model answer
A leaf node is a node with no children.
- 4
What is a binary search tree?
Model answer
A binary search tree is a binary tree ordered so that every value in a node's left subtree is smaller than that node and every value in its right subtree is larger.
- 5
What does a node of a binary tree hold when the tree is built with pointers?
Model answer
It holds the data item, a pointer to the left child and a pointer to the right child, with a null pointer wherever a child is absent.
- 6
How is a binary tree represented using arrays?
Model answer
Three parallel arrays hold the data, the subscript of the left child and the subscript of the right child, with a reserved value such as −1 standing for a null pointer.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Advanced Data Structures and Logic, 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.