Function to construct a segment tree from a given array This function allocates memory for segment tree and calls constructSTUtil ( ) to fill the allocated memory
void constructST ( int arr [ ] , int n ) {