public static Node2 Tree2List(NodeTree tree, Node2 list) { if (tree == null) { return(list); } Node2 newNode = new Node2(); newNode.value = tree.value; newNode.next = null; list.next = newNode; list = newNode; list = Tree2List(tree.L, list); list = Tree2List(tree.R, list); return(list); }
public void Push(Node2 node) { _tail.next = node; _tail = node; _size++; }
public QueueNode2() { _size = 0; _head = new Node2(); _tail = _head; }