Content-Length: 2653 | pFad | http://github.com/fishercoder1534/Leetcode/pull/123.patch
thub.com From 9a4169d0d1981c11f851d255d7248293ae64f222 Mon Sep 17 00:00:00 2001 From: divyalakhwani31 <34311805+divyalakhwani31@users.noreply.github.com> Date: Wed, 28 Oct 2020 18:38:37 +0530 Subject: [PATCH] Create 1609. Even Odd Tree --- cpp/1609. Even Odd Tree | 61 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 cpp/1609. Even Odd Tree diff --git a/cpp/1609. Even Odd Tree b/cpp/1609. Even Odd Tree new file mode 100644 index 0000000000..f80dbc805d --- /dev/null +++ b/cpp/1609. Even Odd Tree @@ -0,0 +1,61 @@ +/** + * Definition for a binary tree node. + * struct TreeNode { + * int val; + * TreeNode *left; + * TreeNode *right; + * TreeNode() : val(0), left(nullptr), right(nullptr) {} + * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} + * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {} + * }; + */ +class Solution { +public: + bool isEvenOddTree(TreeNode* root) { + vectorFetched URL: http://github.com/fishercoder1534/Leetcode/pull/123.patch
Alternative Proxies: