jeffgerickson / algorithms

Bug-tracking for Jeff's algorithms book, notes, etc.
7.88k stars 1.02k forks source link

[Oops.] Chapter 3, Exercise 31—Upside down towers #244

Open emilykfox opened 3 years ago

emilykfox commented 3 years ago

Please verify that the error is present in the most recent revision before reporting.

Downloaded today.

Chapter number or note title: Chapter 3

Page number: 141

Error description:

In Chapter 3, Exercise 31, the first constraint for moving a disk to a different peg states "we must never place a smaller disk on top of a larger disk". The alternative would be to place larger disks on top of smaller ones, making the towers wobbly.

Suggested fix (if any):

Change the first constraint to state "we must never place a larger disk on top of a smaller disk".