summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
Diffstat (limited to 'sources')
-rw-r--r--sources/tree_bst_check.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/tree_bst_check.py b/sources/tree_bst_check.py
index 28af017..b646d4c 100644
--- a/sources/tree_bst_check.py
+++ b/sources/tree_bst_check.py
@@ -21,13 +21,13 @@ def isBst(key, left, right):
else:
i = keyIndexStack.pop()
if len(result) > 0:
- if key[i] <= result[-1]:
+ if key[i] < result[-1]:
return False
result.append(key[i])
walkLeft = False
else:
if right[currentIndex] != -1:
- if key[right[currentIndex]] <= key[currentIndex]:
+ if key[right[currentIndex]] < key[currentIndex]:
return False
currentIndex = right[currentIndex]
keyIndexStack.append(currentIndex)