Esempio n. 1
0
        public DllNode InsertAtaSpecifiedPosition(DllNode headPointor, int value, int position)
        {
            DllNode temp = new DllNode();
            temp.value = value;
            temp.Prev = null;
            temp.Next = null;

               // if(headPointor =)

            return temp;
        }
Esempio n. 2
0
        public DllNode InsertAtaSpecifiedPosition(DllNode headPointor, int value, int position)
        {
            DllNode temp = new DllNode();

            temp.value = value;
            temp.Prev  = null;
            temp.Next  = null;


            // if(headPointor =)

            return(temp);
        }
Esempio n. 3
0
        public void PrintTheListFront(DllNode headPointor)
        {
            Console.WriteLine("---------------------");
            Console.WriteLine("The list elements front are");
            Console.WriteLine("---------------------");


            if (headPointor != null)
            {
                while (headPointor.Next != null)
                {
                    Console.Write("{0}->", headPointor.value);
                    headPointor = headPointor.Next;
                }
                Console.Write("{0}", headPointor.value);
            }
        }
Esempio n. 4
0
        public void PrintTheListBack(DllNode headPointor)
        {
            Console.WriteLine("---------------------");
            Console.WriteLine("The list elements back are");
            Console.WriteLine("---------------------");

            string outputString = string.Empty;

            if (headPointor != null)
            {
                while (headPointor.Prev != null)
                {
                    outputString = "<-" + headPointor.value + outputString;
                    headPointor  = headPointor.Prev;
                }
                outputString = headPointor.value + outputString;
                Console.WriteLine("\r{0}  ", outputString);
            }
        }
Esempio n. 5
0
        public void PrintTheListBack(DllNode headPointor)
        {
            Console.WriteLine("---------------------");
            Console.WriteLine("The list elements back are");
            Console.WriteLine("---------------------");

            string outputString=string.Empty;

            if(headPointor != null)
            {
                while(headPointor.Prev!=null)
                {
                    outputString = "<-" + headPointor.value + outputString;
                    headPointor = headPointor.Prev;
                }
                outputString = headPointor.value + outputString;
                Console.WriteLine("\r{0}  ", outputString);
            }
        }
Esempio n. 6
0
        public DllNode InsertToTheFront(DllNode headPointor, int value)
        {
            DllNode tempNode = new DllNode();
            tempNode.value = value;
            tempNode.Prev = null;
            tempNode.Next = null;

            DllNode pointorToLoop = headPointor;

            if (headPointor.value != 0)
            {
                while (pointorToLoop.Next != null)
                {
                    pointorToLoop = pointorToLoop.Next;
                }
                pointorToLoop.Next = tempNode;

                return headPointor;
            }
            return tempNode;
        }
Esempio n. 7
0
        public DllNode InsertToTheFront(DllNode headPointor, int value)
        {
            DllNode tempNode = new DllNode();

            tempNode.value = value;
            tempNode.Prev  = null;
            tempNode.Next  = null;

            DllNode pointorToLoop = headPointor;

            if (headPointor.value != 0)
            {
                while (pointorToLoop.Next != null)
                {
                    pointorToLoop = pointorToLoop.Next;
                }
                pointorToLoop.Next = tempNode;

                return(headPointor);
            }
            return(tempNode);
        }
Esempio n. 8
0
 public void PrintBothLeftAndRightNodes(DllNode headPointor)
 {
 }
Esempio n. 9
0
 public void PrintBothLeftAndRightNodes(DllNode headPointor)
 {
 }
Esempio n. 10
0
        public void PrintTheListFront(DllNode headPointor)
        {
            Console.WriteLine("---------------------");
            Console.WriteLine("The list elements front are");
            Console.WriteLine("---------------------");

            if(headPointor != null)
            {
                while(headPointor.Next!=null)
                {
                    Console.Write("{0}->",headPointor.value);
                    headPointor = headPointor.Next;

                }
                Console.Write("{0}",headPointor.value);
            }
        }