Skyline Problem

Опубликовано: 14 Январь 2016
на канале: Tushar Roy - Coding Made Simple
194,027
2.8k

  / tusharroy25  
https://github.com/mission-peace/inte...
https://github.com/mission-peace/inte...
https://www.educative.io/page/1100000...
You are given a set of n rectangles in no particular order. They have varying widths and heights, but their bottom edges are collinear, so that they look like buildings on a skyline. For each rectangle, you’re given the x position of the left edge, the x position of the right edge, and the height. Your task is to draw an outline around the set of rectangles so that you can see what the skyline would look like when silhouetted at night.