NEW
Font size
WorksheetsData Structures - Tree
Total questions: 20
Worksheet time: 20mins
What is the value of the ROOT node in this Tree?
35
24
42
20
Root
data structure similar to a graph, with no loops.
an object in a graph also known as a vertex
a join of relationship between nodes - also know as an arc
the starting node in a rooted tree structure from which all other nodes branch off./
Tree
data structure similar to a graph, with no loops.
an object in a graph also known as a vertex
a join of relationship between nodes - also know as an arc
the starting node in a rooted tree structure from which all other nodes branch off./
Binary TREE
data structure similar to a graph, with no loops.
an object in a graph also known as a vertex
a join of relationship between nodes - also know as an arc
a tree where each node can only have 2 child nodes attached to it
In preorder traversal of a binary tree the second step is ____________
traverse the right subtree
traverse the left subtree
traverse right subtree and visit the root
visit the root
The decision tree structure begins at a node called the _____.
span
top
root
branch
How many leaf are there in the tree?
1
3
4
7
Which of these tree traversal methods is used to output the contents of a binary tree in ascending order?
Pre-Order
In-Order
Post-Order
Monastic Orders
What are the 3 depth traversals for a tree data structure?
Pre-, In- and Post-order
Pro-, In- and Past-order
Pre-, Out- and Post-order
Pre-, In- and New-order
When traversing a binary tree, which diagram is post-order?
When traversing a binary tree, which diagram is pre-order?
A Data Structure is:
A C++ vector
A way of organizing, storing and performing operations on data.
A function in any programming language
A sequence of steps to solve a problem.
Given a sequence of number below:
50,60,40,70,45,55,30,80,65,35,25,75,85
When creating a binary search tree, what is the height of the tree?
3
4
5
6
Given a binary search tree, insert 27, 15, 63, 99, 70 and 85 (in this order) into the binary search tree. What is the post-order traversal?
5,15,27,34,47,54,63,70,72,75,83,85,88,94,99,101
72,54,34,5,27,15,47,63,70,83,75,88,85,101,94,99
15,27,5,47,34,70,63,54,75,85,99,94,101,88,83,72
15,27,5,47,34,63,54,70,75,85,99,94,101,88,83,72
none of the above
Choose the correct statement
A data structure is a specialised format for organising and storing data
A data structure is a specialised format for organising and storing information
A data structure is a format for organising and storing only one data type
A data structure is too complicated to truly understand or use
