public void AddNode(string n) { Node node = new Node(); node.Name = n; Node cur = head; while (cur.next != head && cur.next != null) { cur = cur.next; } node.next = head; cur.next = node; }
public CircularLinkedList(string n) { head = new Node(); head.Name = n; }
public CircularLinkedList() { head = new Node(); head.Name = "Head Node"; }