Skip to content

Instantly share code, notes, and snippets.

@nmussy
Last active December 27, 2015 19:19
Show Gist options
  • Save nmussy/7376541 to your computer and use it in GitHub Desktop.
Save nmussy/7376541 to your computer and use it in GitHub Desktop.
int nbelem = cptelemlist(list);
Element * temp = list->head;
for(int i = 0; i < nbelem; ++i) {
for(int j = 0; j < nbelem - 1; j++) {
if(compare (list,temp, getmotnext(temp)))
swap(list,temp,getmotnext(temp));
temp = getmotnext(temp);
}
Element * temp = list->head;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment