伪代码实现单链表逆序输出(1-k逆序)
ElementType Pop(LinkStack *S)
{
struct Node * FisrtCell;
ElementType TopElem;
if (IsEmpty(S)){
printf("堆栈空"); return NULL;
}else {
FirstCell = S->Next;
S->Next = FirstCell->Next;
TopElem = FirstCell->Data;
free(FirstCell);
return TopElem;
}