Leetcode One Question of the Day 2020.10.23 Question 234: Palindrome Link List

234. Palindrome Linked List

Title description

Please judge whether a linked list is a palindrome linked list.
Source: LeetCode
Link: https://leetcode-cn.com/problems/palindrome-linked-list/ The
copyright is owned by LeetCode . For commercial reprints, please contact the official authorization. For non-commercial reprints, please indicate the source.

Example

Insert picture description here

Ideas

First of all, it is very simple to reverse a list in Python: list[::-1], so it should be possible to put all the values ​​in the linked list into the list.
Insert picture description here

Guess you like

Origin blog.csdn.net/m0_51210480/article/details/109245147