-
Notifications
You must be signed in to change notification settings - Fork 253
/
operation.cpp
50 lines (36 loc) · 1.18 KB
/
operation.cpp
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "list.h"
#include "operation.h"
#include "my_data.h"
void insertAndSort(List &L, infotype x) {
/**
* IS : List may be empty
* PR : insert a new element 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).
* If new data has duplicate ID, new data is rejected.
* FS : elements in List L sorted by ID, P is inside List L
*/
//-------------your code here-------------
your code here
//----------------------------------------
}
void deletebyID(List &L, int id_x) {
/**
* IS : List L may be empty
* FS : an element with ID info = id_x is deleted from List L (deallocate)
*/
address Prec, P;
//-------------your code here-------------
your code here
//----------------------------------------
}
void savePassedMember(List &L, List &L2){
/**
* IS : List L and L2 may be empty
* FS : any element with score greater than 80 is moved to L2
*/
address P;
//-------------your code here-------------
your code here
//----------------------------------------
}