Skyline Problem
Tushar Roy - Coding Made Simple
0:00 / 0:00
Skyline Problem
206 073 просмотра · 10 лет назад
Tushar Roy - Coding Made Simple
252 тыс. подписчиков
206 073 просмотра · 10 лет назад
/ 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.