PART 4 / LESSON 26 · Overview free · interactive lesson in the full course

Buffer search and selection algorithms

Compare pattern matching, greedy selection and running statistics on bounded streams or arrays.

View lesson accessAll lessons

What the lesson covers

The course lesson is called Finding things in buffers. The modem driver scans every incoming byte for OK and ERROR, and the scan is quadratic. Then the scheduler needs the most jobs it can fit in a window, and the statistics page needs a median and a running histogram.

Before you start

Question to think about: What should the algorithm do with an empty pattern, overlapping matches or repeated values?

Preparation exercise: Define expected outputs for small boundary cases before comparing algorithmic costs.

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