i have a structure thats a linked list.

struct x
{
int win;
int loss;
};

after getting data from the user i need to sort the linked list in descending order of wins and ascending order of loss.

Please help me..