Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nodoL* stacca(nodo * &L, int*A){
- if(!L && A[0]>=1){
- return 0;
- }
- if(A[0]==1 && L){
- nodo* cacca=L;
- if(L->next==0){
- L=0;
- }
- else{
- L=L->next;
- }
- nodoL* peppina=new nodoL(cacca, 0);
- return peppina;
- }
- else{
- A[0]=A[0]-1;
- nodoL*bubu = stacca(L->next, A);
- if(bubu==NULL){
- return 0;
- }
- else{
- nodoL* pepo = new nodoL(L,bubu);
- return pepo;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement