diff options
author | Michael Hunteman <michael@michaelted.xyz> | 2022-09-22 10:14:04 -0500 |
---|---|---|
committer | Michael Hunteman <michael@michaelted.xyz> | 2022-09-22 10:14:04 -0500 |
commit | 6522012065712fb0ece31bff9ff10b38a83b10e1 (patch) | |
tree | 743f3c13d08be9f60bad57b74e7a1fe7cc675e89 /node |
Initial commit
Diffstat (limited to 'node')
-rw-r--r-- | node/GraphNode.class | bin | 0 -> 624 bytes | |||
-rw-r--r-- | node/GraphNode.java | 21 | ||||
-rw-r--r-- | node/ListNode.class | bin | 0 -> 396 bytes | |||
-rw-r--r-- | node/ListNode.java | 9 |
4 files changed, 30 insertions, 0 deletions
diff --git a/node/GraphNode.class b/node/GraphNode.class Binary files differnew file mode 100644 index 0000000..ae63fe4 --- /dev/null +++ b/node/GraphNode.class diff --git a/node/GraphNode.java b/node/GraphNode.java new file mode 100644 index 0000000..db15ebb --- /dev/null +++ b/node/GraphNode.java @@ -0,0 +1,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; + } +} diff --git a/node/ListNode.class b/node/ListNode.class Binary files differnew file mode 100644 index 0000000..a0f839b --- /dev/null +++ b/node/ListNode.class diff --git a/node/ListNode.java b/node/ListNode.java new file mode 100644 index 0000000..6b345ec --- /dev/null +++ b/node/ListNode.java @@ -0,0 +1,9 @@ +package node; + +public class ListNode { + public int val; + public ListNode next; + public ListNode() {} + public ListNode(int val) { this.val = val;} + public ListNode(int val, ListNode next) { this.val = val; this.next = next; } +} |