二叉树的遍历 先序遍历:【根左右】ABCDEFGHK 中序遍历:【左根右】BDCAEHGKF 后序遍历:【左右根】DCBHKGFEA 二叉搜索树的一个特性:二叉搜索树的中序遍历为 递增序列 // 打印中序遍历 void dfs(TreeNode root) { if(root == null) return; dfs(root.left); // 左 System.out.println(root.val); // 根 dfs(root.right); // 右 }