PREV INDEX NEXT

Author: Unknown
Subject: Pointer ? / IsEmptyD()
Date: Saturday, 14 Mar 2020, 12:00:56

I see that in Aspnes' pop() function, he writes: 

e = s;
s = e->next;
free(e);

where e is a temp pointer to the node. Why is it necessary to write s = e->next, rather than s = s->next? Is there a difference?
----
Also for isEmptyD() how is it possible for the value of *d to change within the function? Aren't we just checking to see if the T stack and the H stack are empty and returning true or false accordingly?
PREV INDEX NEXT