Function to return the sum of arr [ 0. . index ] This function assumes that the array is preprocessed and partial sums of array elements are stored in BITree [ ]
int getSum ( int BITree [ ] , int index ) {