Function to construct a segment tree from given array . This function allocates memory for segment tree and calls constructSTUtil ( ) to fill the allocated memory
def constructST ( arr : List [ int ] , n : int ) -> List [ int ] : NEW_LINE