Lets drop the code back to pseudo-code and analyze the algorithm.
while ( pointer is NOT null )
// do some things
// else do some things
// ok that is enough doing
Now that pointer is...
Type: Posts; User: jps
Lets drop the code back to pseudo-code and analyze the algorithm.
while ( pointer is NOT null )
// do some things
// else do some things
// ok that is enough doing
Now that pointer is...
If you are asking how to get the average of the elements of a linked list, the answer is to add every element to a total and divide by the number of elements.
Dividing by 2 only gives the average...