range sum query from 1 to ind ind is 1-indexed time-complexity : o log n concode_field_sep int[] array concode_field_sep int size concode_elem_sep void update concode_elem_sep void main
int function ( int arg0 ) { assert arg0 > 0 ; int loc0 = 0 ; while ( arg0 > 0 ) { loc0 += array [ arg0 ] ; arg0 -= arg0 & ( - arg0 ) ; } return loc0 ; }