preorder and in order to rebuild a binary tree

pointer, reference…