From d272d985ca8dc3c916024c33e78323cf98c3aa1b Mon Sep 17 00:00:00 2001 From: harasz31 <59858062+harasz31@users.noreply.github.com> Date: Sun, 9 Feb 2020 20:04:49 +0700 Subject: [PATCH] harasz31 --- ASD_Task_2.layout | 14 ++++++------ list.cpp | 56 ++++++++++++++++++++++++++++++++++++++++------- list.h | 5 +++-- operation.cpp | 11 ++++++++++ 4 files changed, 69 insertions(+), 17 deletions(-) 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)); + } //----------------------------------------