Trees (OCR A-Level Computer Science): Quizzes

📚Quizzes
Trees
Sign up to keep practising.Create a free account to play more quizzes and track your progress.

Practise the questions

15 questions from this quiz

Show

What is a tree in computer science?

A hierarchical data structure of nodes

What is the root in a tree?

The topmost node

What is a leaf node?

A node with no children

What is an edge in a tree?

A connection between parent and child

How many children can each node have in a binary tree?

At most two

In a BST, where are values less than the parent stored?

Left child

What distinguishes a multi-branch tree?

Nodes can have more than two children

What is the time complexity for BST operations in a balanced tree?

O(logn)O(\log n)

In array implementation, what index is the left child of node at ii?

2i+12i + 1

In array implementation, what index is the right child of node at ii?

2i+22i + 2

What is the order in post-order traversal?

Left → Right → Root

Given tree A(B(D,E),C), what is the post-order traversal?

D → E → B → C → A

How are nodes visited in breadth-first traversal?

Level by level, left to right

How to remove a BST node with two children?

Replace with in-order successor

What time complexity can unbalanced BSTs degrade to?

O(n)O(n)

Explore OCR A-Level Computer Science Revision Notes by Topics

Explore OCR A-Level Computer Science Model Answers by Topics

Explore OCR A-Level Computer Science Flashcards by Topics

Explore OCR A-Level Computer Science Exam Questions by Topics

Join 100,000+ A-Level students studying Quizzes with us.

Select your subjects, and get access to A+ resources today.