Example #1
0
        public bool Add(CiclicList <T> other)
        {
            if (other == null)
            {
                return(false);
            }
            ListNode <T> tmp = HEAD;

            if (this.length == 0)
            {
                HEAD        = other.HEAD;
                this.length = other.length;
                return(true);
            }
            uint i = 0;

            while (i < length - 1)
            {
                ++i;
                tmp = tmp.next;
            }
            tmp.next = other.HEAD;
            length   = length + other.length;
            return(true);
        }
Example #2
0
 public bool Merge(CiclicList <T> ListToMerge)
 {
     return(this.Add(ListToMerge));
 }