irealy dont know how to sort my liked list .
i should sort it by friends and by name .
please try to help me......
i dont know even how to start.
here is my structs :
typedef struct Person {
int id;
char* name;
struct PersonList* friends;
} Person;
typedef struct PersonList {
Person* person;
struct PersonList* next;
} PersonList;
### this programm should be like facebook .
the sorting function is :
PersonList *sortByPopularity(PersonList* allPersons);
at this point i can get person by ID(the output is apointer to the person)
and also i can count number of friends to a spesific person
any help is welcome!!!!!