2. Let T be an array of floating point numbers, all unique. Using binary heap find k smallest values from T.
-void unheap (double*T, int N, int i){
-void downheap (double*T, int N, int i){
-double*KSmallest (List*L){
He never mentioned what upheap and downheap is. I tried to find something about it on my own but without any succes. Can some one tell me how to 'bite' this problem? I and the rest of my class will be very grateful.
Oh yeah. Right. Thanks! But this does not change anything. Considering the names of functions (which make some sense now) i have to reorder entire heap and then by function downheap sort this heap from lowest to highest and in the last function return K first elements which should be the smallest now? Is this a good way?