Example #1
0
 private static void AddLast(NodeIterator i, Node n)
 {
     if (i.Next == null)
     {
         i.Next = n;
     }
     else
     {
         AddLast(++i, n);
     }
 }
Example #2
0
 private static void AddFirst(NodeIterator i, Node n)
 {
     if (i.Previous == null)
     {
         i.Previous = n;
     }
     else
     {
         AddFirst(--i, n);
     }
 }
Example #3
0
        static void Main(string[] args)
        {
            //var meme = Node.NodeList( 5 );

            NodeIterator m = new NodeIterator(new Node(2));

            m.AddFirst(new Node(1));
            m.AddLast(new Node(3));
            m.AddLast(new Node(4));

            //Node.PrintList( meme.First );

            //int[] x = { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
            //bubbleSort( x );
        }