Wednesday, June 18, 2008


Binomial-Heap-Minimum (H)

The above Function obtains an element with minimum key value from the given binomial heap, ‘H’. The Function returns the pointer which points to the node having minimum key value.
Step 1 Initialization
set y  Nil
set x  head [H]
set min  
Step 2 Loop, obtaining minimum key value
whil (x  Nil)
if (key [x] < min) then
set min  key [x]
set y  x
set k  sib [x]
setting sibling
Step 3 Return at the point of call
return y.

No comments: