Data Structures19 sections · 729 units
Open in Course

Quiz: Difference Arrays

Update mechanics

Check Your Understanding

To add value v to indices l through r using a difference array, which operations do you perform?

  1. A.diff[l] += v and diff[r+1] -= v
  2. B.diff[l] += v only
  3. C.diff[l] += v and diff[r] -= v
  4. D.diff[l-1] += v and diff[r+1] -= v
Start the roadmap to answer the quizzes and solve the challenges