Updated binary max heap and min heap