Open govindbalaji-s opened 4 years ago
Please verify that the error is present in the most recent revision before reporting.
Chapter number or note title: Chapter 4 Greedy Algorithms
Page number: 170
Error description: In line 4 of the pseudocode of BuildHuffman , the loop for i <- n to 2n-1 overwrites the nth leaf too.
BuildHuffman
for i <- n to 2n-1
Suggested fix (if any): Line 4 should be for i <- n+1 to 2n-1
for i <- n+1 to 2n-1
Please verify that the error is present in the most recent revision before reporting.
Chapter number or note title: Chapter 4 Greedy Algorithms
Page number: 170
Error description: In line 4 of the pseudocode of
BuildHuffman
, the loopfor i <- n to 2n-1
overwrites the nth leaf too.Suggested fix (if any): Line 4 should be
for i <- n+1 to 2n-1