boolean isMaxHeap(int i)
	{
		if (2 * i > N) // no children
			return true;
		
		// Not a max heap if parent is lesser than its children
		if (less(pq[i], pq[2 * i])
				|| ((2 * i + 1 <= N) && less(pq[i], pq[2 * i + 1])))
			return false;
		
		// Recursively test for left and right subheaps
		return (isMaxHeap(2 * i) && isMaxHeap(2 * 1 + 1));
	}