← Greedy Algorithms Quiz: all 8 questions
Greedy Algorithms Quiz · Question 4 of 8
How many intervals must be removed from [[1,2], [2,3], [3,4], [1,3]] so the rest don't overlap?
How many intervals must be removed from [[1,2], [2,3], [3,4], [1,3]] so the rest don't overlap?
Answer & explanation
Correct answer: 1
Sorted by end: [1,2], [2,3], [1,3], [3,4]. Keep [1,2], [2,3], [3,4]; remove [1,3].
Can you get the rest right without peeking?
Take the timed Greedy Algorithms Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →