Module 14 · The Algorithms You Will Use Weekly: accumulate to nth_element
Full Programs: From a One-Line Average to the k-th Smallest
Free with an accountReading
Every week brings the same small jobs. Average a class's marks, keep a running total of steps, turn a duty rota, clean a sign-up list. List every order of a few chores, and find the middle response time of a web page. Each job is one algorithm call with a few lines around it. Six programs follow, each a little bigger than the last. The "new thing" line above each program says what it adds.
Checking what this lesson needs for you…
What is inside Full Programs: From a One-Line Average to the k-th Smallest
- Program 1: a one-line average
- Program 2: running totals of a week's steps
- Program 3: turning a duty rota
- Program 4: removing duplicates, and collapsing repeatsIntermediate
- Program 5: every order of four choresIntermediate
- Program 6: the median and the 90th percentileIntermediate