N trees (numbered from
N-1) in a forest. The
K-th tree is located at coordinates
We want to build the widest possible vertical path, such that there is no tree on it.
The path must be built somewhere between a leftmost and a rightmost tree, which means that the width of the path cannot be infinite.
This is a companion discussion topic for the original entry at https://algo.monster/problems/widest_path_without_trees/