Skip to content

Commit 4014a21

Browse files
committed
Runtime: 722 ms (Top 5.05%) | Memory: 169.4 MB (Top 18.67%)
1 parent 3594467 commit 4014a21

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/algorithms/E/Even Odd Tree/Even Odd Tree.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 722 ms (Top 5.05%) | Memory: 169.4 MB (Top 18.67%)
12
class Solution {
23
public:
34
bool isEvenOddTree(TreeNode* root) {
@@ -7,10 +8,10 @@ class Solution {
78
q.push(root);
89
int j=0;
910
while(q.empty()!=true)
10-
{ vector<int>v;
11+
{ vector<int>v;
1112
int n=q.size();
1213
for(int i=0;i<n;i++)
13-
{ TreeNode* t=q.front();q.pop();
14+
{ TreeNode* t=q.front();q.pop();
1415
v.push_back(t->val);
1516
if(t->left) q.push(t->left);
1617
if(t->right) q.push(t->right);
@@ -44,4 +45,4 @@ class Solution {
4445
}
4546
return true;
4647
}
47-
};
48+
};

0 commit comments

Comments
 (0)