for left and right sub-node, if their value is the same with the parent node value, need to using recursion to find the next candidate, otherwise use their node value as the candidate.

```
public int findSecondMinimumValue(TreeNode root) {
if (root == null) {
return -1;
}
if (root.left == null && root.right == null) {
return -1;
}
int left = root.left.val;
int right = root.right.val;
// if value same as root value, need to find the next candidate
if (root.left.val == root.val) {
left = findSecondMinimumValue(root.left);
}
if (root.right.val == root.val) {
right = findSecondMinimumValue(root.right);
}
if (left != -1 && right != -1) {
return Math.min(left, right);
} else if (left != -1) {
return left;
} else {
return right;
}
}
```