Binary search and calibration tables
Work with ordered data, boundary searches and lookup tables stored in firmware.
View lesson accessAll lessonsWhat 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.
- binary search
- lower_bound
- interpolation
- search on the answer
- rotated arrays
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