walkccc / CLRS

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

Update 4.3.md #441

Closed mehrdad3301 closed 2 years ago

mehrdad3301 commented 2 years ago

(Avoiding pitfalls) I was reading solution to 4.3.5 when I came across this error. In the line prior to the end, when proving that T(n) is O(nlgn), 2c was omitted. but doing so would mean c < 0 which is not correct. In other words induction hypothesis doesn't hold for the proof to be correct. adding -2c to induction hypothesis resolves the issue. same thing Omega.

walkccc commented 2 years ago

You're right! Thank you!