A recursive function to construct Full binary tree from pre [ ] and preM [ ] . preIndex is used to keep track of index in pre [ ] . l is low index and h is high index for the current subarray in preM [ ]
Node * constructBinaryTreeUtil ( int pre [ ] , int preM [ ] , int & preIndex , int l , int h , int size ) {