示例#1
0
        public MyLinkedList2 NewList()
        {
            var result = new MyLinkedList2();
            var tail   = Temp;
            var head   = Temp;
            var count  = Count();

            count = (count + 1) / 2;
            while (head.Prev != null)
            {
                head = head.Prev;
            }
            for (int i = 0; i < count; i++)
            {
                result.Add(head.Info * tail.Info);
                head = head.Next;
                tail = tail.Prev;
            }
            return(result);
        }