We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
输入一个链表,按链表值从尾到头的顺序返回一个ArrayList。
链表是单向从头到尾的遍历,而题目要求从尾到头输出,这就是典型的后进先出模型,可以使用栈的特征,而递归模型本来就是栈,可以直接递归,但是需要注意调用栈的溢出问题,最好还是显示使用栈。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
题目描述
输入一个链表,按链表值从尾到头的顺序返回一个ArrayList。
思路
链表是单向从头到尾的遍历,而题目要求从尾到头输出,这就是典型的后进先出模型,可以使用栈的特征,而递归模型本来就是栈,可以直接递归,但是需要注意调用栈的溢出问题,最好还是显示使用栈。
The text was updated successfully, but these errors were encountered: