Advertisement
sedran

BinaryHeap main()

Oct 15th, 2011
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. /*
  2.  * Main.cpp
  3.  *
  4.  *  Created on: 15 Eki 2011
  5.  *      Author: Serdar KUZUCU
  6.  */
  7.  
  8. #include <iostream>
  9. #include "BinaryHeap.cpp"
  10.  
  11. using namespace std;
  12.  
  13. int main() {
  14.     BinaryHeap<int> myheap(3);
  15.     for(int i=0; i<17; i++) {
  16.         myheap.insert(i*2);
  17.     }
  18.     myheap.print();
  19.  
  20.     myheap.deleteMin();
  21.  
  22.     myheap.print();
  23.  
  24.     myheap.deleteMin();
  25.  
  26.     myheap.print();
  27.     return 0;
  28. }
  29.  
  30.  
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement