예제 #1
0
        static void Main(string[] args)
        {
            PersonLinkedList PersonList = new PersonLinkedList();

            PersonLinkedList.Person Ted = new PersonLinkedList.Person("Ted", "Sully", 23, "12345", null);
            PersonLinkedList.Person Reta = new PersonLinkedList.Person("Reta", "Lopez", 44, "12345", null);
            PersonLinkedList.Person Sally = new PersonLinkedList.Person("Sally", "Hofsten", 36, "12345", null);
            PersonLinkedList.Person Mike = new PersonLinkedList.Person("Mike", "Dunken", 55, "12345", null);

            PersonList.Add(Ted);
            PersonList.Add(Reta);
            //PersonList.Add(Sally);
            PersonList.Add(Mike);

            //////////
            PersonList.ListNodes();
            PersonList.MergeIntoList(Ted, Sally);
            PersonList.ListNodes();
            Console.ReadLine();
        }
예제 #2
0
 public void SplitList(PersonLinkedList ThisList)
 {
     //
     //split list into L & R
     //take the count of the list and /2.
     int LeftCount = size / 2;
     //if % != 0 take L_list + 1.
     //assign new head to begining of R_list.//headOfRightList
     //assign Next pointer of last node in L_list to null.
     //
 }