Posts by Eduardo • 21 points
2 posts
-
0
votes2
answers10186
viewsA: How to order a chained list in alphabetical order?
You need two loops to work, the algorithm is the Bubble Sort; void ordenar(lista **l) { if(*l == NULL || (*l)->prox == NULL) return; //se for nulo(vazio), ou apenas 1 elemento lista *aux = *l,…
-
2
votes2
answers402
viewsQ: Operation to release a circular list
I am in doubt in the implementation of the method of releasing the memory of a circular chained list: void liberarLista() { if(head == NULL) return; //retorna original(NULL); lista *aux, *temp =…