diff --git a/ASD_Task_2.layout b/ASD_Task_2.layout index e69ac9c..7742588 100644 --- a/ASD_Task_2.layout +++ b/ASD_Task_2.layout @@ -2,24 +2,24 @@ - + - + - + - + - + - + - + diff --git a/list.cpp b/list.cpp index f61d73d..fe56e71 100644 --- a/list.cpp +++ b/list.cpp @@ -6,6 +6,7 @@ void createList(List &L) { */ //-------------your code here------------- cout<<"your code here"< x){ + insertFirst(L, allocate(x)); + } else if (findElm(L, x) == NULL){ + while (P != NULL && info(P) < x){ + Q = P; + P = next(P); + } + insertAfter(L, Q, allocate(x)); + } //----------------------------------------