BIT (Binary Indexed tree)
I heard this problem can solve with BIT . can anyone explain me this solution . i don't understand two_pointers solution of this problem well help me for that too .