With the following structures allocated:
typedef struct {
char *name;
int commonality;
int weight;
}
typedef struct {
char *name;
char *description;
double area;
int monsters;
monster *monsters;
} region;
typedef struct {
char *name;
double diameter;
int nregions;
regions *regions;
} planet;
void dispose_monster(monster *monster);
void dispose_region(region *region);
void dispose_planet(planet *planet);
With the following structures defined:
struct monster_struct {
char *name;
int commonality;
int weight;
struct monster_struct *next;
};
typedef struct monster_struct monster;
typedef struct monster_list {
monster *head;
}
monster *second_most_common(monster_list *m1);
monster *third_lightest(monster_list *ml);
Analysis: