blob: db15ebb2e7a32f80f6070068fcd59073f45eb3b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package node;
import java.lang.*;
import java.util.*;
public class GraphNode {
public int val;
public ArrayList<GraphNode> neighbors;
public GraphNode() {
val = 0;
neighbors = new ArrayList<GraphNode>();
}
public GraphNode(int val) {
this.val = val;
neighbors = new ArrayList<GraphNode>();
}
public GraphNode(int val, ArrayList<GraphNode> neighbors) {
this.val = val;
this.neighbors = neighbors;
}
}
|