-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStructures.cs
More file actions
97 lines (82 loc) · 1.58 KB
/
Copy pathStructures.cs
File metadata and controls
97 lines (82 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LeetCode;
public class Node3
{
public int val;
public Node3 left;
public Node3 right;
public Node3 next;
public Node3() { }
public Node3(int _val)
{
val = _val;
}
public Node3(int _val, Node3 _left, Node3 _right, Node3 _next)
{
val = _val;
left = _left;
right = _right;
next = _next;
}
}
public class Node2
{
public int val;
public IList<Node2> neighbors;
public Node2()
{
val = 0;
neighbors = new List<Node2>();
}
public Node2(int _val)
{
val = _val;
neighbors = new List<Node2>();
}
public Node2(int _val, List<Node2> _neighbors)
{
val = _val;
neighbors = _neighbors;
}
}
public class Node
{
public int val;
public IList<Node> children;
public Node() { }
public Node(int _val)
{
val = _val;
}
public Node(int _val, IList<Node> _children)
{
val = _val;
children = _children;
}
}
public class ListNode
{
public int val;
public ListNode? next;
public ListNode(int val = 0, ListNode? next = null)
{
this.val = val;
this.next = next;
}
}
public class TreeNode
{
public int val;
public TreeNode? left;
public TreeNode? right;
public TreeNode(int val = 0, TreeNode? left = null, TreeNode? right = null)
{
this.val = val;
this.left = left;
this.right = right;
}
}