PART 2 / LESSON 15 · Overview free · interactive lesson in the full course

Trees and binary search trees in embedded C

Represent hierarchical data, traverse trees and examine ordering, shape and validation.

View lesson accessAll lessons

What the lesson covers

The course lesson is called The tree that organises the hardware. The board's peripherals are described by a nested structure: buses contain devices that contain registers. Asha realises it is a tree, and learns to walk it, search it and keep it balanced.

Before you start

Question to think about: How does the shape of a tree affect search and traversal costs?

Preparation exercise: Construct small balanced and skewed examples and specify the properties a validator should check.

This is an original public study prompt, not the paid lesson or its solution. The interactive course contains the walkthroughs, labs, exercises and recaps.

Read the free embedded C articles for additional practice.

Test your understanding

Practice free firmware interview questions and mock interviews · Assess your readiness