logo

Topic study hub

Tree-traversal

Official AQA 7517 section 4.3.2.

0

Objectives

5

Flashcards

7

Questions

36 min

Study time

AqaA LevelComputer ScienceFundamentals of algorithms

Choose a revision tool

Start revising Tree-traversal

Syllabus checklist

What you need to know

0 objective pages available

Simple tree-traversal algorithms1 objectives
  • Simple tree-traversal algorithms: Be able to trace the tree-traversal algorithms: • pre-order • post-order • in-order. Be able to describe uses of tree-traversal algorithms. Pre-Order: copying a tree. In-Order: binary search tree, outputting the contents of a binary search tree in ascending order. Post-Order: Infix to RPN (Reverse Polish Notation) conversions, producing a postfix expression from an expression tree, emptying a tree.

Key terms

Tree traversalReverse Polish Notation (RPN)

Exam tips

  • Write the traversal rule before tracing: Before following the tree, write the relevant order: pre-order current-left-right, in-order left-current-right, or post-order left-right-current.

Common mistakes

  • Putting the root in the wrong position: Remember the three patterns: pre-order is current-left-right, in-order is left-current-right, and post-order is left-right-current.

Practice preview

Continue by objective

Objectives are grouped by subtopic so students can jump straight to the exact skill they want to revise.

Related topics

Study nearby topics next