Introduction to Algorithms solutions

Hi!

Welcome to my solutions to the exercises and problems of Introduction to Algorithms, 3rd edition, lovingly abbreviated as CLRS.

Introduction to Algorithms cover

Don't trust a single word! While mistakes were not intended, they were surely made. I'm doing this for fun – I have neither the energy nor the patience to double-check everything. If you find an error, please don't contact me to fix it.

This is a journey in progress. I'm neither in a hurry, not hell-bent on getting there. I'll add new solutions over time, but am not adhering to a schedule.

Chapter 01

Section 1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5
Section 2 1.2.1 1.2.2 1.2.3
Problems 1.1

Chapter 02

Section 1 2.1.1 2.1.2 2.1.3 2.1.4
Section 2 2.2.1 2.2.2 2.2.3 2.2.4
Section 3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7
Problems 2.1 2.2 2.3 2.4

Chapter 03

Section 1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8
Section 2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8
Problems 3.1 3.2 3.3 3.4 3.5 3.6

Chapter 04

Section 1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5
Section 2 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7
Section 3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9
Section 4 4.4.1 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9
Section 5 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5
Section 6 4.6.1 4.6.2 4.6.3
Problems 4.1 4.2 4.3 4.4 4.5 4.6

Chapter 05

Section 1 5.1.1 5.1.2 5.1.3
Section 2 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5
Section 3 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7
Section 4 5.4.1 5.4.2 5.4.3 5.4.4 5.4.5 5.4.6 5.4.7
Problems 5.1 5.2

Chapter 06

Section 1 6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.1.7
Section 2 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6
Section 3 6.3.1 6.3.2 6.3.3
Section 4 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5
Section 5 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.5.8 6.5.9
Problems 6.1 6.2 6.3

Chapter 07

Section 1 7.1.1 7.1.2 7.1.3 7.1.4
Section 2 7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.2.6
Section 3 7.3.1 7.3.2
Section 4 7.4.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.6
Problems 7.1 7.2 7.3 7.4 7.5 7.6

Chapter 08

Section 1 8.1.1 8.1.2 8.1.3 8.1.4
Section 2 8.2.1 8.2.2 8.2.3 8.2.4
Section 3 8.3.1 8.3.2 8.3.3 8.3.4 8.3.5
Section 4 8.4.1 8.4.2 8.4.3 8.4.4 8.4.5
Problems 8.1 8.2 8.3 8.4 8.5 8.6 8.7

Chapter 09

Section 1 9.1.1 9.1.2
Section 2 9.2.1 9.2.2 9.2.3 9.2.4
Section 3 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.3.6 9.3.7 9.3.8 9.3.9
Problems 9.1 9.2 9.3 9.4

Chapter 10

Section 1 10.1.1 10.1.2 10.1.3 10.1.4 10.1.5 10.1.6 10.1.7
Section 2 10.2.1 10.2.2 10.2.3 10.2.4 10.2.5 10.2.6 10.2.7 10.2.8
Section 3 10.3.1 10.3.2 10.3.3 10.3.4 10.3.5
Section 4 10.4.1 10.4.2 10.4.3 10.4.4 10.4.5 10.4.6
Problems 10.1 10.2 10.3

Chapter 11

Section 1 11.1.1 11.1.2 11.1.3 11.1.4
Section 2 11.2.1 11.2.2 11.2.3 11.2.4 11.2.5 11.2.6
Section 3 11.3.1 11.3.2 11.3.3 11.3.4 11.3.5 11.3.6
Section 4 11.4.1 11.4.2 11.4.3 11.4.4 11.4.5
Section 5 11.5.1
Problems 11.1 11.2 11.3 11.4

Chapter 12

Section 1 12.1.1 12.1.2 12.1.3 12.1.4 12.1.5
Section 2 12.2.1 12.2.2 12.2.3 12.2.4 12.2.5 12.2.6 12.2.7 12.2.8 12.2.9
Section 3 12.3.1 12.3.2 12.3.3 12.3.4 12.3.5 12.3.6
Section 4 12.4.1 12.4.2 12.4.3 12.4.4 12.4.5
Problems 12.1 12.2 12.3 12.4

Chapter 13

Section 1 13.1.1 13.1.2 13.1.3 13.1.4 13.1.5 13.1.6 13.1.7
Section 2 13.2.1 13.2.2 13.2.3 13.2.4 13.2.5
Section 3 13.3.1 13.3.2 13.3.3 13.3.4 13.3.5 13.3.6
Section 4 13.4.1 13.4.2 13.4.3 13.4.4 13.4.5 13.4.6 13.4.7
Problems 13.1 13.2 13.3 13.4

Chapter 14

Section 1 14.1.1 14.1.2 14.1.3 14.1.4 14.1.5 14.1.6 14.1.7 14.1.8
Section 2 14.2.1 14.2.2 14.2.3 14.2.4
Section 3 14.3.1 14.3.2 14.3.3 14.3.4 14.3.5 14.3.6 14.3.7
Problems 14.1 14.2

Chapter 15

Section 1 15.1.1 15.1.2 15.1.3 15.1.4 15.1.5
Section 2 15.2.1 15.2.2 15.2.3 15.2.4 15.2.5 15.2.6

Chapter C

Section 1 C.1.1 C.1.2 C.1.3 C.1.4 C.1.5 C.1.6 C.1.7 C.1.8 C.1.9 C.1.10 C.1.11 C.1.12 C.1.13 C.1.14 C.1.15
Section 2 C.2.1 C.2.2 C.2.3 C.2.4 C.2.5 C.2.6 C.2.7 C.2.8 C.2.9 C.2.10
Section 3 C.3.1 C.3.2 C.3.3 C.3.4 C.3.5 C.3.6 C.3.7 C.3.8 C.3.9 C.3.10
Section 4 C.4.1 C.4.2 C.4.3 C.4.4 C.4.5 C.4.6 C.4.7 C.4.8 C.4.9
Section 5 C.5.1 C.5.2 C.5.3 C.5.4 C.5.5 C.5.6 C.5.7
Problems C.1