Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7ba94d

Browse files
committed
Update 0234. 回文链表.md
1 parent eac3fca commit c7ba94d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Solutions/0234. 回文链表.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@
55

66
## 题目大意
77

8-
给定一个链表,判断该链表是否为回文链表。
8+
给定一个链表的头节点 `head`
9+
10+
要求:判断该链表是否为回文链表。
911

1012
## 解题思路
1113

12-
利用数组,将链表元素依次存入。然后再使用两个指针,一个指向数组开始位置,一个指向数组结束位置,依次判断首尾对应元素是否相等,若都相等,则为回文链表。若不相等,则不是回文链表。
14+
- 利用数组,将链表元素依次存入。
15+
- 然后再使用两个指针,一个指向数组开始位置,一个指向数组结束位置。
16+
- 依次判断首尾对应元素是否相等,如果都相等,则为回文链表。如果不相等,则不是回文链表。
1317

1418
## 代码
1519

0 commit comments

Comments
 (0)