完全二叉树 1. 普通二叉树的遍历,统计节点个数 public int countNodes(TreeNode root){ if (root == null) return 0; return 1 + countNodes(root.left) + countNodes(root.right); }