We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ff5ea4 commit 01a8e29Copy full SHA for 01a8e29
src/com/andavid/leetcode/_098/Solution.java
@@ -1,9 +1,9 @@
1
class Solution {
2
- public static boolean isValidBST(TreeNode root) {
+ public boolean isValidBST(TreeNode root) {
3
return isValidBST(root, Long.MIN_VALUE, Long.MAX_VALUE);
4
}
5
6
- public static boolean isValidBST(TreeNode root, long min, long max) {
+ public boolean isValidBST(TreeNode root, long min, long max) {
7
if (root == null) {
8
return true;
9
@@ -32,7 +32,8 @@ public static void main(String[] args) {
32
node1.left = node1.right = null;
33
node2.left = node2.right = null;
34
35
- System.out.println(isValidBST(root));
+ Solution solution = new Solution();
36
+ System.out.println(solution.isValidBST(root));
37
38
39
0 commit comments