skyline-problem in javascript
Given n rectangular buildings in a 2-dimensional city, computes the skyline of these buildings, eliminating hidden lines. The main task is to view buildings from a side and remove all sections that are not visible.
Time complexity of above recursive implementation is same as Merge Sort.
T(n) = T(n/2) + Θ(n)
Solution of above recurrence is Θ(nLogn)