Skip to content

Commit c4a8b97

Browse files
committed
Create README - LeetHub
1 parent 343036e commit c4a8b97

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<h2><a href="https://leetcode.com/problems/longest-common-prefix">14. Longest Common Prefix</a></h2><h3>Easy</h3><hr><p>Write a function to find the longest common prefix string amongst an array of strings.</p>
2+
3+
<p>If there is no common prefix, return an empty string <code>&quot;&quot;</code>.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre>
9+
<strong>Input:</strong> strs = [&quot;flower&quot;,&quot;flow&quot;,&quot;flight&quot;]
10+
<strong>Output:</strong> &quot;fl&quot;
11+
</pre>
12+
13+
<p><strong class="example">Example 2:</strong></p>
14+
15+
<pre>
16+
<strong>Input:</strong> strs = [&quot;dog&quot;,&quot;racecar&quot;,&quot;car&quot;]
17+
<strong>Output:</strong> &quot;&quot;
18+
<strong>Explanation:</strong> There is no common prefix among the input strings.
19+
</pre>
20+
21+
<p>&nbsp;</p>
22+
<p><strong>Constraints:</strong></p>
23+
24+
<ul>
25+
<li><code>1 &lt;= strs.length &lt;= 200</code></li>
26+
<li><code>0 &lt;= strs[i].length &lt;= 200</code></li>
27+
<li><code>strs[i]</code> consists of only lowercase English letters if it is non-empty.</li>
28+
</ul>

0 commit comments

Comments
 (0)