Hao Zhan

Results 5 comments of Hao Zhan

772 java, 1ms, faster than 90+% ``` Java class OnePass_20220709 { private int i; private int n; public int calculate(String s) { this.n = s.length(); this.i = 0; return helper(s);...

I found a similar issue. create tree from int[] {1,2,3,3,3,4,5} , as the follow shows. It should not return true. ..........3 ...2..........4 1...3......3...5

In this fix the bug? https://github.com/hobossa/cc189/blob/main/proj/src/main/java/CH04_TreesAndGraphs/ValidateBST/ValidateBST_v3.java Using a static int variable to record the last element's depth. // traverse the tree using an in-order traversal (left, current, right). // there...

![image](https://user-images.githubusercontent.com/30287128/49267067-94e1dc80-f493-11e8-9b3e-de715b049362.png)