public: int countNodes(TreeNode* root) { if(root==nullptr) return 0; else return 1+countNodes(root->left)+countNodes(root->right); } };
//Please tell me time complexity of this code. //Thank You