链表节点定义为如下:
```java
public class Node<T> {
public T value;
public Node<T> next = null;
Node(T value) {
this.value = value;
}
}
```
二叉树的节点定义如下:
```java
static class TreeNode {
public Integer value = null;
public TreeNode right = null;
public TreeNode left = null;
public TreeNode(Integer val) {
this.value = val;
}
}
```
5题 | 被引用0次