Skills101
← All practice quizzes

Greedy Algorithms Quiz

8 questions10 minPass: 60%+10 XP on first pass

When greedy works, interval scheduling, jump game, gas station and partition labels.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    A greedy algorithm…

  2. Question 2

    What is the best way to check whether a greedy idea is wrong?

  3. Question 3

    To keep the MOST non-overlapping intervals, sort intervals by…

  4. Question 4

    How many intervals must be removed from [[1,2], [2,3], [3,4], [1,3]] so the rest don't overlap?

  5. Question 5

    Can you reach the last index of [3, 2, 1, 0, 4] in Jump Game? Type yes or no.

  6. Question 6

    What is the minimum number of jumps to reach the end of [2, 3, 1, 1, 4]?

  7. Question 7

    In Gas Station, if the running tank goes negative at station i, the next candidate start is…

  8. Question 8Select all that apply

    Which problems are typically solved greedily? (select all that apply)