Minimum/Maximum value in a Binary Indexed Tree

891 Views Asked by At

I know how a BIT works. But I was wondering if a BIT can be used to find the minimum/maximum element in the complete range, or more specifically, to find the minimum (or maximum) value after all the update processes have been completed. Now, I know that this can very well be achieved using Segment Trees, but is it possible to do the same using a BIT?

Thanks.

PS: I know the obvious way of traversing the complete BIT and calculating the value at each index. I am looking for a more efficient/optimized way.

0

There are 0 best solutions below