What you learn today
- Quiz on tables, sorting and statistics
This week the stack got proper data structures. For review:
- Lookup table: precompute values, store them with
poke. Index = (reading − offset) / step,floor,clamp. - Interpolation: the integer part selects the neighbours, the remainder is the fraction.
lerplimits the fraction to 0 to 1. - Sorting: bubble sort compares neighbours and swaps through two registers. n · (n − 1) / 2 comparisons – expensive.
- Searching: linear, with early exit. Minimum and maximum in one pass, the position with a comparison of its own.
- Statistics: mean, range, standard deviation in two passes. Outliers: more than 2 σ from the mean, with
sgt. - Data logger: ring buffer with
mod, tick counter for the interval, no NaN into the buffer.
You pass from 60 %.
Weekly quiz
10 questions. You pass from 60 % – the server does the grading.
Complete the day
- Passed the quiz with at least 60 %
Without an account progress is saved in this browser only.
Report a mistake in this lesson
Please sign in to report. Sign in