Skip to content

Commit 739b76e

Browse files
committed
Runtime: 36 ms (Top 27.23%) | Memory: 24.3 MB (Top 34.42%)
1 parent 855f51b commit 739b76e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
// Runtime: 36 ms (Top 27.23%) | Memory: 24.3 MB (Top 34.42%)
12
class Solution {
23
public:
34
void findInorder(TreeNode* root, vector<int> &ans) {
45
if(root == NULL)
56
return;
6-
7+
78
findInorder(root->left, ans);
89
ans.push_back(root->val);
910
findInorder(root->right, ans);
@@ -13,4 +14,4 @@ class Solution {
1314
findInorder(root, ans);
1415
return ans[k-1];
1516
}
16-
};
17+
};

0 commit comments

Comments
 (0)