Dynamic Programming21 sections · 916 units
Open in Course

Quiz: Deque Invariant

Why we pop from back

Check Your Understanding

When using a deque to maintain convex hull with decreasing slopes, what invariant must be preserved?

  1. A.Each line must have positive slope
  2. B.Deque always has exactly n lines for n states
  3. C.Lines stored in increasing order of y-intercept
  4. D.Adjacent lines must intersect at increasing x-coordinates
Start the roadmap to answer the quizzes and solve the challenges