A recursive function that constructs Segment Tree for array [ ss . . se ] . si is index of current node in segment tree st operation denotes which operation is carried out at that level to merge the left and right child . It 's either 0 or 1.
void constructSTUtil ( int arr [ ] , int ss , int se , int * st , int si , int operation ) {