从尾到头打印单链表voidFromTailToHeadPrint(SListNode*&head)
{
stack<SListNode*>s;
SListNode*cur=head;
while(cur)
{
s.push(cur);
cur=cur->_next;
}
while(!s.empty())
{
cout<<s.top()->_data<<"->";
s.pop();
}
cout<<""<<..
分类:
编程语言 时间:
2016-05-11 19:59:40
阅读次数:
361