If there are more than one elements , then recur for left and right subtrees and store the sum of the two values in this node
int mid = getMid ( segmentStart , segmentEnd ) ; segmentTree [ si ] = constructSTUtil ( arr , segmentStart , mid , segmentTree , si * 2 + 1 ) + constructSTUtil ( arr , mid + 1 , segmentEnd , segmentTree , si * 2 + 2 ) ; return segmentTree [ si ] ; }