![]() |
LinkedList
Code:
#include <stdio.h> |
Re: LinkedList
> if(scanf("%d", &n)!=1)n=0;
> }//end while So you'll only be able to make nodes containing the value 1. Is that intentional? What input do you give and what output do you get? Code:
to = to->next;If you suspect isDeleted(), try stepping through it on paper with a sample list and a few examples of nodes to delete. Make sure you check the behaviour of deletion from the top and end as well as in the middle. Also try using sensible names. It makes debugging a lot easier. Not only is the code then fairly self-documenting, it also means that newcomers to your code won't struggle trying to figure out wtf is going on. |
| All times are GMT +5.5. The time now is 15:05. |