yousefgheibi / skyline-problem

skyline-problem in javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

skyline-problem

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)

About

skyline-problem in javascript


Languages

Language:JavaScript 100.0%