class SimpleHeapImpl implements Heap<T> {

	@Override
	public T pop() throws EmptyHeapException {
		if (heap.isEmpty()) {
			throw new EmptyHeapException();
		}

		com.github.kowshik.bigo.common.ListUtils.swap(heap, 0, heap.size() - 1);
		T toReturn = heap.remove(heap.size() - 1);
		heapify(0);

		return toReturn;
	}

	public  SimpleHeapImpl(Comparator<T> comparator);
	public  SimpleHeapImpl(List<T> list, Comparator<T> comparator);
	public  SimpleHeapImpl(T[] array, Comparator<T> comparator);

}