mirror of
https://github.com/Didnelpsun/CS408.git
synced 2026-02-07 21:04:38 +08:00
更新链表与数据操作
This commit is contained in:
@@ -21,12 +21,13 @@ int SequenceListTest() {
|
||||
int LinkListTest() {
|
||||
LinkListWithHead list;
|
||||
//cout << list.Empty() << endl;
|
||||
//element_type a[6] = { '1','2','3','4','5','6' };
|
||||
//list.LoopInsert(a, 1, 6);
|
||||
list.Insert(1, '3');
|
||||
list.Print();
|
||||
list.Insert(2, '4');
|
||||
element_type a[6] = { '1','2','3','4','5','6' };
|
||||
list.PriorInsert(a, 2, 3);
|
||||
list.Print();
|
||||
cout << list.GetLength() << endl;
|
||||
LinkListWithoutHead list2;
|
||||
list2.PriorInsert(a, 2, 3);
|
||||
list2.Print();
|
||||
cout << list2.GetLength() << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user