_siftup and _siftdown implementation
srinivas devaki
mr.eightnoteight at gmail.com
Thu Feb 4 15:50:01 EST 2016
_siftdown function breaks out of the loop when the current pos has a valid
parent.
but _siftup function is not implemented in that fashion, if a valid subheap
is given to the _siftup, it will bring down the root of sub heap and then
again bring it up to its original place.
I was wondering why it is so, is it just to make the code look simple???
Regards
Srinivas Devaki
Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad)
Computer Science and Engineering Department
ph: +91 9491 383 249
telegram_id: @eightnoteight
More information about the Python-list
mailing list