Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void InsertSort(List* lst_ptr){
- Node* i = lst_ptr->first->next;
- Node* j;
- int valor_atual, aux;
- while(i != NULL){
- j = i->back;
- valor_atual = i->info;
- while((j != NULL) && (valor_atual < j->info)){
- aux = j->info;
- j->info = j->next->info;
- j->next->info = aux;
- j = j->back;
- }
- i = i->next;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement