fenwick

Indexing count of buckets

So, here is my little problem. Let's say I have a list of buckets a0 ... an which respectively contain L <= c0 ... cn < H items. I can decide of the L and H limits. I could even update them dynamically, though I don't think it would help much. The order of the buckets matter. I can't go and swap them around. Now, I'd like to index the...