DIY: The Skyline Problem
Explore how to represent the outer silhouette of a city's skyline by processing a list of building coordinates and their heights. Learn to implement an algorithm that outputs the critical points forming the skyline contour without redundant coordinates. This lesson enhances your ability to solve spatial and geometric interview problems using Elixir.
We'll cover the following...
We'll cover the following...
Problem statement
Given a buildings list, you have to draw the skyline of the outer contour of the city. The citys’ skyline is formed by the silhouette of all of its buildings.
Each building in this buildingslist consists of the following information:
- lefti: The x-coordinate of the left edge of the building.
- righti: The x-coordinate of the right edge