j**********0 发帖数: 20 | 1 public static class BinaryNode{
BinaryNode leftChild;
BinaryNode rightChild;
int val;
public BinaryNode(int val) {
super();
this.val = val;
}
}
public int find(BinaryNode node, int from, int to){
int[] inRangeSubTree=new int[1];
find(node, from, to, inRangeSubTree);
return inRangeSubTree[0];
}
public boolean find(BinaryNode node, int from, int to, int[]
inRangeSubTree){
... 阅读全帖 |
|