Пример ввода:
Код: Выделить всё
intervals = [[1, 4], [2, 3], [2, 5], [7, 9]]
Код: Выделить всё
class Solution:
def intersectionSizeTwo(self, intervals):
intervals.sort()
result = []
for start, end in intervals:
count = 0
for x in result:
if start
Подробнее здесь: [url]https://stackoverflow.com/questions/79826836/why-does-my-python-solution-for-selecting-2-points-from-each-interval-give-incor[/url]
Мобильная версия