【算法】剑指 Offer 06. 从尾到头打印链表

在这里插入图片描述

1.概述

链接:https://leetcode-cn.com/problems/cong-wei-dao-tou-da-yin-lian-biao-lcof

输入一个链表的头节点,从尾到头反过来返回每个节点的值(用数组返回)。

示例 1:

输入:head = [1,3,2]
输出:[2

猜你喜欢

转载自blog.csdn.net/qq_21383435/article/details/121549137