コード例 #1
0
ファイル: LinkedList.cs プロジェクト: ZanubKH/c-APP
        public void ConvertBest5ToLinkedList(int[] best5)
        {
            foreach (int t in best5)
            {
                if (t != 1000)
                {
                    TimeNode tnode = new TimeNode(t);

                    if (First != null)
                    {
                        //there are 1 or more items already in the linked list
                        Last.Next = tnode;
                        Last      = tnode;
                    }
                    else
                    {// there are no items in the linked list
                        First = tnode;
                        Last  = First;
                    }
                }
            }
        }
コード例 #2
0
ファイル: LinkedList.cs プロジェクト: ZanubKH/c-APP
 public LinkedTimeList()
 {
     First = null;
     Last  = null;
 }
コード例 #3
0
ファイル: LinkedList.cs プロジェクト: ZanubKH/c-APP
 public TimeNode(int time)
 {
     Time = time;
     Next = null;
 }