Skip to content

Commit a74f665

Browse files
authored
Update Kth Smallest Element in a BST - Leetcode 230.py
1 parent 08bdbb3 commit a74f665

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Kth Smallest Element in a BST - Leetcode 230.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ def dfs(node):
1919
ans[0] = node.val
2020

2121
count[0] = count[0] - 1
22-
2322
if count[0] > 0:
2423
dfs(node.right)
25-
24+
2625
dfs(root)
2726
return ans[0]
2827
# Time: O(n)

0 commit comments

Comments
 (0)