Added Binary Indexed Tree algorithm