Advertisement
Aldin-SXR

main() pq

May 5th, 2020
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. public static void main(String[] args) {
  2.    
  3.     BinaryHeap<Integer> heap = new BinaryHeap<Integer>();
  4.        
  5.     heap.insert(4);
  6.     heap.insert(10);
  7.     heap.insert(-5);
  8.     heap.insert(7);
  9.        
  10.     System.out.println("current max: " + heap.delMax());
  11.     System.out.println("current max: " + heap.delMax());
  12.     System.out.println("current max: " + heap.delMax());
  13.     System.out.println("heap size: " + heap.size());
  14.     System.out.println("current max: " + heap.delMax());
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement