Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is a greedy algorithm?
Think about local vs. global decisions.
Which strategy does our greedy algorithm use for interval scheduling?
What does 'earliest' help achieve?
What does a greedy algorithm rely on to make decisions?
Think about how it makes choices without looking back.
True or False: Greedy algorithms always guarantee an optimal solution.
Have we tested this in our discussions?
Given the bookings [(0, 5), (1, 3), (2, 4), (3, 7), (5, 8)], find the optimal set of bookings and explain your choice.
Remember to select those that leave the most room for future choices.
Analyze the impact if the intervals were sorted in the wrong order initially. How would that affect the greedy algorithm's performance?
Consider the sequence of choices and their effects on possible selections.
6 more questions in this section. Enroll free to practise them all.
Enroll free