jeffgerickson / algorithms

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

Possible error in longest increasing subsequence solution (using array indices) #115

Closed Bibeknam closed 5 years ago

Bibeknam commented 5 years ago

Chapter number or note title: 02 Backtracking

Page number: 18

Error description: While checking whether the next number is less than or equal to the current number, the expressions on both sides of <= are incorrect (using indices pseudocode)

Suggested fix (if any): A[1] <= prev must be replaced by A[j] <= A[i]

TruongQToan commented 5 years ago

I have already come over that too.

jeffgerickson commented 5 years ago

Already fixed.