I understand both algorithms, however the time complexity feels weird for me.
If you looked at both trees generated by both algorithms you will see that they are exactly the same, We keep dividing the tree to two halves until we reach to the end.
So why is one algorithm has complexity of 2^N while the other is nlog(n) ?