forked from ASD-ADF/ASD_Task_4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoperation.cpp
More file actions
36 lines (26 loc) · 922 Bytes
/
operation.cpp
File metadata and controls
36 lines (26 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "doublelist.h"
#include "operation.h"
#include "my_data.h"
#include "my_data2.h"
void insertAndSort(List &L, address P) {
/**
* IS : List may be empty
* PR : insert an element pointed by P into an already sorted-by-ID List L
* so that the elements inside List L is still sorted by ID
* procedure must also check if such ID is already exists (No Duplicate ID)
* FS : elements in List L sorted by ID, P is inside List L
*/
//-------------your code here-------------
cout<<"your code here"<<endl;
//----------------------------------------
}
void deletebyID(List &L, infotype x) {
/**
* IS : List L may be empty
* FS : an element with ID info = x.id is deleted from List L (deallocate)
*/
address Prec, P;
//-------------your code here-------------
cout<<"your code here"<<endl;
//----------------------------------------
}