Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct lista {
- int info;
- struct lista *prox;
- }TLSE;
- int func(TLSE * l,int distance,int pass){
- if(!l) return -1;
- if(!distance) l->info = pass;
- l->info = func(l->prox,distance-1,l->info);
- }
- void invertList(TLSE * l){
- if(!l)return;
- TLSE * k = l;
- int size = 0;
- while(l){
- l = l->prox
- size++;
- }
- func(k,size,-1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement