Skip to content

Commit 8267a55

Browse files
committed
Create README - LeetHub
1 parent 0ed200b commit 8267a55

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

0014-longest-common-prefix/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<h2><a href="https://leetcode.com/problems/longest-common-prefix/">14. Longest Common Prefix</a></h2><h3>Easy</h3><hr><div><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>""</code>.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre><strong>Input:</strong> strs = ["flower","flow","flight"]
9+
<strong>Output:</strong> "fl"
10+
</pre>
11+
12+
<p><strong class="example">Example 2:</strong></p>
13+
14+
<pre><strong>Input:</strong> strs = ["dog","racecar","car"]
15+
<strong>Output:</strong> ""
16+
<strong>Explanation:</strong> There is no common prefix among the input strings.
17+
</pre>
18+
19+
<p>&nbsp;</p>
20+
<p><strong>Constraints:</strong></p>
21+
22+
<ul>
23+
<li><code>1 &lt;= strs.length &lt;= 200</code></li>
24+
<li><code>0 &lt;= strs[i].length &lt;= 200</code></li>
25+
<li><code>strs[i]</code> consists of only lowercase English letters.</li>
26+
</ul>
27+
</div>

0 commit comments

Comments
 (0)