Hash tables and lookup cost in firmware
Evaluate lookup cost, collisions and memory use as the number of entries grows on a small system.
View lesson accessAll lessonsWhat the lesson covers
The course lesson is called The lookup that got slow. The gateway finds each reading's sensor by scanning an array. With 8 sensors on the bench it was instant. With 400 in the field, readings back up.
- Big-O in cycles
- hash tables
- collisions
- hash functions
- Two Sum
Before you start
Question to think about: What happens to a lookup's worst-case work when many keys collide?
Preparation exercise: Compare a linear search and a bounded hash table using an explicit RAM and latency budget.
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