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.
def constructSTUtil ( arr , ss , se , st , si , operation ) : NEW_LINE