{
public T Value;
- public LinkedList<Node> Childs = new LinkedList<Node>();
+ public readonly LinkedList<Node> Childs = new LinkedList<Node>();
public Node(T value)
{
}
}
- private Node rootNode = null;
+ private Node rootNode;
public int Count { get; private set; }
this.Count = 0;
}
- public void RemoveFirst()
- {
- this.rootNode = this.Unify(this.rootNode.Childs);
- this.Count--;
- }
-
public void Push(T item)
{
this.rootNode = this.Merge(this.rootNode, new Node(item));
return ret;
}
+ public void RemoveFirst()
+ {
+ this.rootNode = this.Unify(this.rootNode.Childs);
+ this.Count--;
+ }
+
private Node Merge(Node l, Node r)
{
if (l == null) return r;