Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is a greedy algorithm?
Think about choosing the best option at every moment.
Describe the goal of interval scheduling.
Think about fitting as many items into a limited space.
What does a greedy algorithm aim to achieve?
Think about what goal greedy choices lead to.
True or False: A greedy algorithm always guarantees a globally optimal solution.
Reflect on when greedy choices might lead astray.
Given the intervals [(1, 3), (2, 4), (4, 5), (3, 6), (7, 8)], list the maximum set of non-overlapping intervals.
Sort by finish time first!
Prove that for a set of n intervals, the greedy algorithm's choice based on finishing times always results in the maximum subset.
Utilize base and inductive case strategy.
6 more questions in this section. Enroll free to practise them all.
Enroll free