@@ -0,0 +1,993 @@
+/**%0A * Definition for a binary tree node.%0A * public class TreeNode %7B%0A *     int val;%0A *     TreeNode left;%0A *     TreeNode right;%0A *     TreeNode(int x) %7B val = x; %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    public int countNodes(TreeNode root) %7B%0A        if(root==null)%0A            return 0;%0A     %0A        int left = getLeftHeight(root)+1;    %0A        int right = getRightHeight(root)+1;%0A     %0A        if(left==right)%7B%0A            return (2%3C%3C(left-1))-1;%0A        %7Delse%7B%0A            return countNodes(root.left)+countNodes(root.right)+1;%0A        %7D%0A    %7D%0A     %0A    public int getLeftHeight(TreeNode n)%7B%0A        if(n==null) return 0;%0A     %0A        int height=0;%0A        while(n.left!=null)%7B%0A            height++;%0A            n = n.left;%0A        %7D%0A        return height;%0A    %7D%0A     %0A    public int getRightHeight(TreeNode n)%7B%0A        if(n==null) return 0;%0A     %0A        int height=0;%0A        while(n.right!=null)%7B%0A            height++;%0A            n = n.right;%0A        %7D%0A        return height;%0A    %7D%0A%7D%0A

Create Count_Complete_Tree_Nodes.java