SHSubjectHub

Tree traversal and Reverse Polish notation

AQA 75174.3 L2A-levelLesson packSubscription
Also online

This worksheet marks itself

Set it as homework or classwork and every answer is marked as pupils go, with feedback on what they got wrong. The scores go straight into your mark book, so you can see who needs help before the next lesson.

  • 11 questions
  • 29 marks
  • about 35 minutes
  • marked instantly

Question types: multiple choice, short answer, matching, true or false.

Try one from this worksheet

Identify the output of a post-order traversal of the binary tree shown.

Pick an answer: it's marked straight away, just as your pupils would see it.

About this resource

AQA A-level Computer Science (7517) 4.3.2.1 Simple tree-traversal algorithms · 4.3.3.1 Reverse Polish: infix transformations. C# lesson 2 of 5 in 4.3 Fundamentals of algorithms: a trace-the-walk Do Now, a short key idea, an 11-challenge ladder in three sets with exact test data, two exam question…

20 slides.

Lesson outline

  1. Do Now: trace the walk
  2. Do Now: answers
  3. Key idea: Three ways to visit every node
  4. Check: the post-order traversal
  5. Key idea: Trace it by hand: the dot method
  6. Key idea: What each traversal is for
  7. Key idea: Reverse Polish notation (RPN)
  8. Check: infix to RPN
  9. Key idea: Evaluating RPN with a stack
  10. Set 1: three ways round a tree
  11. Set 2: what the traversals are for
  12. Exam question E1: traversals
Unit bundle4.3 Algorithms · full C# lessons
Part of: 4.3 Algorithms · full C# lessons: the whole unitEvery resource in the unit in one zip.

More from 4.3 Algorithms · full C# lessons