Problem 2345 · Medium

Finding the Number of Visible Mountains

Each peak owns a ground interval; a mountain is hidden when another interval contains its own, identical peaks included.

Open the interactive visualisation