We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c95caac commit 7eda84cCopy full SHA for 7eda84c
BST/kthlargest.cpp
@@ -2,7 +2,6 @@ class Solution {
2
public:
3
int kthLargest(TreeNode* root, int k) {
4
stack<TreeNode*> numberStack;
5
- if(!root) return 0;
6
numberStack.push(root);
7
while(!numberStack.empty() || root) {
8
while(root) {
0 commit comments