-
Notifications
You must be signed in to change notification settings - Fork 0
/
list.h
47 lines (35 loc) · 809 Bytes
/
list.h
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
#ifndef LIST_H
#define LIST_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct _list list;
typedef struct _problemlist problemlist;
typedef struct _sizelist sizelist;
typedef struct _problemsol problemsol;
struct _list{
char *word;
list *next;
};
struct _problemlist{
int order;
char *pal1;
char *pal2;
int maxmut;
problemlist *next;
};
struct _sizelist{
int size;
sizelist *next;
};
struct _problemsol{
int weight;
list *path;
problemsol *next;
};
list *newlist(char *word, list *next);
problemlist *newproblemlist(int order, char *pal1, char *pal2, int maxmut, problemlist *next);
sizelist *newsizelist(int size, sizelist *next);
problemsol *newproblemsol(int weight, list *path);
problemsol *newspecialsol(int weight, list *path, problemsol *next);
#endif