walkccc / CLRS

📚 Solutions to Introduction to Algorithms Third Edition
https://walkccc.me/CLRS
MIT License
4.63k stars 1.26k forks source link

Update 2.1.md #459

Closed ABandet closed 1 year ago

ABandet commented 1 year ago

Hello there,

I think the right algo for 2.1.4 is with C[i] = A[i] + B[i] + r. Current solution shift binary operation to the left and final operation overwrite C[n+1] = A[n] + B[n] + r with C[n+1] = r

walkccc commented 1 year ago

Thanks. Actually, I found other mistakes led by https://github.com/walkccc/CLRS/pull/444 since I overlooked that the solution already states that "least-significant digit first". Will redo this problem.