# TAOCP 1.2.10 Analysis of an Algorithm

> Week 40 of the cracked.guide path: Knuth 1.2.10 Analysis of an Algorithm; LeetCode: 2 NeetCode 150 problems.

Week 40 of 145 on cracked.guide, in TAOCP Vol 1: Fundamental Algorithms: TAOCP 1.2.10 Analysis of an Algorithm and 2 NeetCode 150 problems. The reading guides budget about 7 hours.

## Key facts {#key-facts}

- [TAOCP 1.2.10 Analysis of an Algorithm](https://cracked.guide/guide/knuth-w026-0): A complete worked analysis of a simple algorithm (finding the maximum of n elements): best case, worst case, average, and full probability distribution of how often the running maximum changes.
- Phase: TAOCP Vol 1: Fundamental Algorithms, weeks 29 to 63.
- Updated October 20, 2026.

## By the end of this week you can {#objectives}

- Trace Algorithm M and count how often the running maximum changes.
- Compute the best, worst and average values of that count for small n.
- Explain why the average count involves the harmonic number H_n.

## This week's tasks {#tasks}

- [TAOCP 1.2.10 Analysis of an Algorithm](https://cracked.guide/guide/knuth-w026-0): about 7 hours
- LeetCode: 2 NeetCode 150 problems

Previous: [Week 39](https://cracked.guide/curriculum/week/39) · Next: [Week 41](https://cracked.guide/curriculum/week/41)

---

Source: https://cracked.guide/curriculum/week/40
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
