Advertisement
OriReschini

P3E9 y 10

May 23rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. BHeap heapify(int arr[], size_t tamanio){
  2.     BHeap arbol=bheap_crear();
  3.     for(int i=0;i<tamanio;++i)
  4.         bheap_insertar(arbol,arr[i]);
  5.     return arbol;
  6. }
  7. BHeap bheap_merge(BHeap heap1, BHeap heap2){
  8.     BHeap arbol=bheap_crear();
  9.     if(bheap_es_vacio(heap1))
  10.         return heap2;
  11.     if(bheap_es_vacio(heap2))
  12.         return heap1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement