Data Structures19 sections · 729 units
Open in Course

Quiz: Histogram

Boundary calculation

Check Your Understanding

In the histogram problem, when we pop index j at position i, why is the right boundary i-1 and not i?

  1. A.Because we're using 0-indexed arrays
  2. B.Because we already processed position i
  3. C.Because bar i is shorter and can't be included in the rectangle
  4. D.It's actually i, not i-1
Start the roadmap to answer the quizzes and solve the challenges