-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsequential_list.h
More file actions
43 lines (27 loc) · 827 Bytes
/
sequential_list.h
File metadata and controls
43 lines (27 loc) · 827 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
37
38
39
40
41
42
43
#include <stdbool.h>
// tamanho máximo da lista
#define MAX 100
// struct exemplo de tipo de dado dinâmico a ser inserido na lista
typedef struct student {
int register_number;
char name[30];
float n1, n2, n3;
} Student;
// implementação da lista
typedef struct list {
int qtd;
struct student data[MAX];
} List;
List *create_list();
int free_list(List *li);
int list_length(List *li);
bool is_full(List *li);
bool is_empty(List *li);
int append_to_end(List *li, Student st);
int append_to_start(List *li, Student st);
int append_sorting(List *li, Student st);
int remove_from_start(List *li);
int remove_from_end(List *li);
int remove_from_index(List *li, int idx);
int get_by_index(List *li, int idx, struct student *st);
int get_by_register_number(List *li, int reg_number, struct student *st);