2848. Points That Intersect With Cars
You are given a 0-indexed 2D integer array
nums
representing the coordinates of the cars parking on a number line. For any indexi
,nums[i] = [starti, endi]
wherestarti
is the starting point of theith
car andendi
is the ending point of theith
car.Return the number of integer points on the line that are covered with any part of a car.
1 | class Solution { |