Refactor 'construct binary tree from pre-order and in-order'.