Skip to content

Commit aaa87f6

Browse files
Create README - LeetHub
1 parent b65379e commit aaa87f6

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Diff for: longest-palindromic-substring/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<h2>5. Longest Palindromic Substring</h2><h3>Medium</h3><hr><div><p>Given a string <code>s</code>, return&nbsp;<em>the longest palindromic substring</em> in <code>s</code>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong>Example 1:</strong></p>
5+
6+
<pre><strong>Input:</strong> s = "babad"
7+
<strong>Output:</strong> "bab"
8+
<strong>Note:</strong> "aba" is also a valid answer.
9+
</pre>
10+
11+
<p><strong>Example 2:</strong></p>
12+
13+
<pre><strong>Input:</strong> s = "cbbd"
14+
<strong>Output:</strong> "bb"
15+
</pre>
16+
17+
<p><strong>Example 3:</strong></p>
18+
19+
<pre><strong>Input:</strong> s = "a"
20+
<strong>Output:</strong> "a"
21+
</pre>
22+
23+
<p><strong>Example 4:</strong></p>
24+
25+
<pre><strong>Input:</strong> s = "ac"
26+
<strong>Output:</strong> "a"
27+
</pre>
28+
29+
<p>&nbsp;</p>
30+
<p><strong>Constraints:</strong></p>
31+
32+
<ul>
33+
<li><code>1 &lt;= s.length &lt;= 1000</code></li>
34+
<li><code>s</code> consist of only digits and English letters (lower-case and/or upper-case),</li>
35+
</ul>
36+
</div>

0 commit comments

Comments
 (0)