Clarifying $\sum_{h=0}^{\lfloor lg(n)\rfloor}\lceil\frac{n}{2^{h+1}}\rceil O(h)=O(n\sum_{h=0}^{\lfloor lg(n)\rfloor}\frac{h}{2^h})$ in BUILD-MAX-HEAP
Since $h \leq \lfloor \lg n \rfloor$, we have $2^h \leq n$, and so $n/2^{h+1} \geq 1/2$. Therefore
$$
\left\lceil \frac{n}{2^{h+1}} \right\rceil \leq
\frac{n}{2^{h+1}} + 1 =
\frac{n}{2^{h+1}} + 2 \cdot \frac{1}{2} \leq
\frac{n}{2^{h+1}} + 2 \frac{n}{2^{h+1}} = 3 \frac{n}{2^{h+1}}.
$$
(In fact, if you are more careful then you can replace $3$ by $2$.)
More generally, if $x \geq c &gt; 0$ then $\lceil x \rceil  = O(x)$, where the hidden constant depends on $c$.