Leet code 234: Linked List Palindrome Problem

preview_player
Показать описание
Leet code 234: Linked List Palindrome Problem

Problem description:
Given the head of a singly linked list, return true if it is a palindrome.

Example 1:

Input: head = [1,2,2,1]
Output: true
Example 2:

Input: head = [1,2]
Output: false

Constraints:

The number of nodes in the list is in the range [1, 105].

Follow up: Could you do it in O(n) time and O(1) space?

👉FOLLOW @geekyxnerd👈
👉FOLLOW @geekyxnerd👈
👉FOLLOW @geekyxnerd👈 .


Here is a step-by-step plan to improve your data structure and algorithm skills:
👆 Turn "ON" notification 🔔 to get notified for New Post
Рекомендации по теме
join shbcf.ru