コード例 #1
0
        public SLL AddBack(int val)
        {
            SLNode node = new SLNode(val);

            if (Head == null)
            {
                Head = node;
            }
            else
            {
                var runner = Head;
                while (runner.Next != null)
                {
                    runner = runner.Next;
                }
                runner.Next = node;
            }
            return(this);
        }
コード例 #2
0
 public SLL()
 {
     Head  = null;
     Count = 0;
 }
コード例 #3
0
 public SLL()
 {
     Head = null;
 }