Widest Path Without Trees - Company-specific OAs / Microsoft OA

There are N trees (numbered from 0 to N-1) in a forest. The K-th tree is located at coordinates (X[K], Y[K]). 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/