ROSALIND|Building a Heap (hea)
給定長度為 n 的整數數列,將其轉置為二元最大堆 (binary max heap)。
Given: A positive integer $n \leq 10^5$ and array $A[1..n]$ of integers from $-10^5$ to $10^5$.
Return: A permuted array $A$ satisfying the binary max heap property: for any $2 \leq i \leq n$, $A[\lfloor i/2 \rfloor] \geq A[i]$.