Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0136f57

Browse files
committed
Added README.md file for Palindrome Linked List
1 parent 3dfb25f commit 0136f57

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

‎234-palindrome-linked-list/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<h2><a href="https://leetcode.com/problems/palindrome-linked-list">Palindrome Linked List</a></h2> <img src='https://img.shields.io/badge/Difficulty-Easy-brightgreen' alt='Difficulty: Easy' /><hr><p>Given the <code>head</code> of a singly linked list, return <code>true</code><em> if it is a </em><span data-keyword="palindrome-sequence"><em>palindrome</em></span><em> or </em><code>false</code><em> otherwise</em>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
<img alt="" src="https://assets.leetcode.com/uploads/2021/03/03/pal1linked-list.jpg" style="width: 422px; height: 62px;" />
6+
<pre>
7+
<strong>Input:</strong> head = [1,2,2,1]
8+
<strong>Output:</strong> true
9+
</pre>
10+
11+
<p><strong class="example">Example 2:</strong></p>
12+
<img alt="" src="https://assets.leetcode.com/uploads/2021/03/03/pal2linked-list.jpg" style="width: 182px; height: 62px;" />
13+
<pre>
14+
<strong>Input:</strong> head = [1,2]
15+
<strong>Output:</strong> false
16+
</pre>
17+
18+
<p>&nbsp;</p>
19+
<p><strong>Constraints:</strong></p>
20+
21+
<ul>
22+
<li>The number of nodes in the list is in the range <code>[1, 10<sup>5</sup>]</code>.</li>
23+
<li><code>0 &lt;= Node.val &lt;= 9</code></li>
24+
</ul>
25+
26+
<p>&nbsp;</p>
27+
<strong>Follow up:</strong> Could you do it in <code>O(n)</code> time and <code>O(1)</code> space?

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /