Search⌘ K
AI Features

DIY: The Skyline Problem

Explore how to solve the skyline problem by generating the city silhouette from building coordinates and heights. This lesson guides you in implementing a function to produce a skyline outline, a common scenario-based coding interview question. Develop problem-solving skills to map real-world inputs to algorithmic solutions in C++.

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 buildings ...