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 1db0f82

Browse files
committed
Create README - LeetHub
1 parent bdee6cb commit 1db0f82

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

‎0014-longest-common-prefix/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/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)

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