Array Increment Problem
Given an array A consisting of 'n' elements. Do the following both
operations in O(log n) time using a data structure.

Increment (A,i,j,x) : This should increment elements from A to A[j] by
value x .
Report(A,j) : This should report A[j]

Trivially in an array Increment takes O(j-i) time and report takes
O(1) . Now we need to store in a data structure (can be augmented)
such that both operations takes O (log n) time.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to