Max heap construction