73: Binary tree size

Given a binary tree, return binary tree size

Note : Size of the binary tree is number of nodes in the tree

 

Example 1

Input:        1  
             / \
            2   3

Output: 3

Example 2

Input:     1  
            \  
             3 

Output: 2
Difficulty:Easy
Topic:Tree
Problem #:73