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

Binary search and calibration tables

Work with ordered data, boundary searches and lookup tables stored in firmware.

View lesson accessAll lessons

What the lesson covers

The course lesson is called The calibration table. The temperature calibration table has 1,024 sorted entries in flash. Scanning it takes too long in the interrupt, so Asha learns to throw away half the table at every step.

Before you start

Question to think about: What should a boundary search return for an absent value or a repeated key?

Preparation exercise: Write expected results for empty, singleton and duplicate-containing tables before choosing a search invariant.

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

Related free reading

Test your understanding

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