Generic Binary Indexed Tree