How to solve this summation of ceiling function in BUILD-MAX-HEAP algorithm
$$
\begin{align*}
\sum_{h=0}^{\lfloor\lg n\rfloor} \left\lceil\frac{n}{2^{h+1}}\right\rceil O(h) 
&amp;&lt;
\sum_{h=0}^{\lfloor\lg n\rfloor} \left(1+ \frac{n}{2^{h+1}}\right) O(h)  \\
&amp;&lt;
\sum_{h=0}^{\lfloor\lg n\rfloor} \left(\frac{n}{2^h} + \frac{n}{2^h}\right) O(h) 
=
2n \sum_{h=0}^{\lfloor\lg n\rfloor} \frac{ O(h) }{2^h}
= O\left(n \sum_{h=0}^{\lfloor\lg n\rfloor} \frac{ h }{2^h}\right).
\end{align*}
$$.