Beispiel #1
0
 public void AddLast(int _val)
 {
     if (_data.Count != 0)
     {
         var a = new CycleListNode(_val, _data[0]);
         _data[_data.Count - 1].Next = a;
         _data.Add(a);
     }
     else
     {
         _data.Add(new CycleListNode(_val, new CycleListNode()));
     }
 }
Beispiel #2
0
 public CycleListNode(int _val, CycleListNode a)
 {
     val  = _val;
     Next = a;
 }