1. define min-heap or max-heap in Java
min-heap:
Queue<Integer> min-heap = new PriorityQueue<>();
max-heap:
Queue<Integer> max-heap = new PriorityQueue<>(Collections.reverseOrder());