1
0
mirror of https://github.com/Didnelpsun/CS408.git synced 2026-02-07 21:04:38 +08:00

更新链表与数据操作

This commit is contained in:
Didnelpsun
2021-08-21 23:58:48 +08:00
parent 3c864b55c1
commit 4b5bdc1edc
5 changed files with 264 additions and 191 deletions

View File

@@ -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;
}
}