Senza usare tante funzioni secondarie superflue.
codice:list append( list l1, list l2 ) { list l3 = (list)malloc(sizeof(listNode)); if( l1 ) { l3->value = l1->value; l3->next = append( l1->next, l2 ); } else if( l2 ) { l3->value = l2->value; l3->next = append( l1, l2->next ); } else l3 = NULL; return l3; }

Rispondi quotando