Skip to content

Commit ae47893

Browse files
committed
Create README - LeetHub
1 parent e9a5d31 commit ae47893

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

‎125-valid-palindrome/README.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<h2><ahref="https://leetcode.com/problems/valid-palindrome/">125. Valid Palindrome</a></h2><h3>Easy</h3><hr><div><p>A phrase is a <strong>palindrome</strong> if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers.</p>
2+
3+
<p>Given a string <code>s</code>, return <code>true</code><em> if it is a <strong>palindrome</strong>, or </em><code>false</code><em> otherwise</em>.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong>Example 1:</strong></p>
7+
8+
<pre><strong>Input:</strong> s = "A man, a plan, a canal: Panama"
9+
<strong>Output:</strong> true
10+
<strong>Explanation:</strong> "amanaplanacanalpanama" is a palindrome.
11+
</pre>
12+
13+
<p><strong>Example 2:</strong></p>
14+
15+
<pre><strong>Input:</strong> s = "race a car"
16+
<strong>Output:</strong> false
17+
<strong>Explanation:</strong> "raceacar" is not a palindrome.
18+
</pre>
19+
20+
<p><strong>Example 3:</strong></p>
21+
22+
<pre><strong>Input:</strong> s = " "
23+
<strong>Output:</strong> true
24+
<strong>Explanation:</strong> s is an empty string "" after removing non-alphanumeric characters.
25+
Since an empty string reads the same forward and backward, it is a palindrome.
26+
</pre>
27+
28+
<p>&nbsp;</p>
29+
<p><strong>Constraints:</strong></p>
30+
31+
<ul>
32+
<li><code>1 &lt;= s.length &lt;= 2 * 10<sup>5</sup></code></li>
33+
<li><code>s</code> consists only of printable ASCII characters.</li>
34+
</ul>
35+
</div>

0 commit comments

Comments
(0)