Given array V of integers.
Need to answer query of two types:
Given L, R, A, B, need to count how many A ≤ j ≤ B are so that L ≤ Vj ≤ R
Given i and X, Vi = X
Someone told me that this is impossible task in O(log n).
Is this true? Can anyone prove me that or prove it being wrong?