Graph and Tree Traversal (AQA A-Level Computer Science): Quizzes

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

Practise the questions

10 questions from this quiz

Show

Why are adjacency lists ideal for sparse graphs?

Store only existing connections

In an adjacency matrix, what does a value of 1 indicate?

An edge exists between two nodes

How does depth first traversal explore a graph?

Far along each path before backtracking

What data structure does breadth first traversal use?

Queue

What does breadth first traversal guarantee to find in unweighted graphs?

The shortest path

What is the pattern for pre-order tree traversal?

Visit-Left-Right

What special property does in-order traversal have for binary search trees?

Produces nodes in sorted order

When would you use post-order traversal?

Deleting nodes from a tree

What happens without a base case in recursion?

Stack overflow error

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

At most two

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

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