1.题目 2.思路 3.java代码 //测试 public class BuildTreeUsingInorderAndPreorder { public static void main(String[] args) { int[] preSort={1,2,4,7,3,5,6,8}; int[] inSort={4,7,2,1,5,3,8,6}; System.out.println(new Solution().buildTree(preSort, inSort)); } } //利用前…