Maximum Non Overlapping Bridges Leetcode