Skip to content

Commit 9b20520

Browse files
edit 98
1 parent aaf09a1 commit 9b20520

File tree

1 file changed

+6
-0
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+6
-0
lines changed

src/main/java/com/fishercoder/solutions/_98.java

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.fishercoder.common.classes.TreeNode;
44

55
/**
6+
* 98. Validate Binary Search Tree
7+
*
68
* Given a binary tree, determine if it is a valid binary search tree (BST).
79
810
Assume a BST is defined as follows:
@@ -52,4 +54,8 @@ private boolean dfs(TreeNode root, long minValue, long maxValue) {
5254
if (root.right != null) rightResult = dfs(root.right, root.val, maxValue);
5355
return leftResult && rightResult;
5456
}
57+
58+
public static void main(String... args) {
59+
System.out.println(Integer.MAX_VALUE == 2147483647);
60+
}
5561
}

0 commit comments

Comments
 (0)