Data Structures19 sections · 729 units
Open in CourseQuiz: 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?
- A.diff[l] += v and diff[r+1] -= v
- B.diff[l] += v only
- C.diff[l] += v and diff[r] -= v
- D.diff[l-1] += v and diff[r+1] -= v