public static <E extends Comparable<E>> E kthLargest(E[] array, int k) {
		if (array == null || k >= array.length || k < 0)
			return null;
		
		MinHeap<E> minheap = new MinHeap<E>();
		
		for (E e : array) {
			if (minheap.size() < k + 1)
				minheap.add(e);
			else if (e.compareTo(minheap.findMin()) > 0) {
				minheap.deleteMin();
				minheap.add(e);
			}
		}
		
		return minheap.findMin();
	}