Minimum points covering intervals
Your task
Given a set of closed integer intervals, find the size of the SMALLEST set S of integers such that every interval contains at least TWO distinct elements of S. Return that minimum size.
Examples
intersection_size_two(intervals: list[list[int]]) -> intExample 1
Input
intersection_size_two([[1, 3], [3, 7], [8, 9]])Output
5