plz help me out with the code here
thanks,
Ravna
ravina_malik
0
Newbie Poster
Recommended Answers
Jump to PostUse this algorithm to delete the last node.
void DelLast(List L) { List Temp; if(L==NULL||L->Next==NULL) { printf("List contains no or just one element."); return; } while(L->Next->Next!=NULL) L=L->Next; Temp=L->Next; L->Next=NULL; free(Temp); } // Won't work for a single unit I guess.
However, am not sure what you mean …
Jump to PostDoes it involve maintaining a separate temporary list of 'n' nodes?
Keep it in English please, not cryptic SMS speak
http://www.catb.org/~esr/faqs/smart-questions.html#writewell
All 8 Replies
QwertyManiac
0
Newbie Poster
Salem
5,138
Posting Sage
Narue
5,707
Bad Cop
Team Colleague
ravina_malik
0
Newbie Poster
Salem
5,138
Posting Sage
Narue
5,707
Bad Cop
Team Colleague
ravina_malik
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.