walkccc / CLRS

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

Update 6.5.md #341

Closed nienjen closed 3 years ago

nienjen commented 3 years ago

Please check the solution is rigorous or not. Thanks.

walkccc commented 3 years ago

I think this doesn't seem right because you return in line 4. Therefore, HEAPIFY(A, I) in line 5 won't be executed. Also, this should be a void function which returns nothing.

nienjen commented 3 years ago

Thanks for your explanation