You are given a peaks where peaks[i] = [x_i, y_i] represents the peak coordinates of the
Each mountain is shaped as an isosceles right triangle with its base on the x axis and its right angle at the peak (x_i, y_i). A mountain covers the horizontal interval from
A mountain is considered visible if its peak does not lie strictly inside or on the boundary of any other mountain.
Return the total number of visible mountains.
Note: If multiple mountains have the exact same peak coordinates, they completely overlap and none of them are considered visible.
Constraints:
peaks.length
peaks[i].length
x_i, y_i
You are given a peaks where peaks[i] = [x_i, y_i] represents the peak coordinates of the
Each mountain is shaped as an isosceles right triangle with its base on the x axis and its right angle at the peak (x_i, y_i). A mountain covers the horizontal interval from
A mountain is considered visible if its peak does not lie strictly inside or on the boundary of any other mountain.
Return the total number of visible mountains.
Note: If multiple mountains have the exact same peak coordinates, they completely overlap and none of them are considered visible.
Constraints:
peaks.length
peaks[i].length
x_i, y_i