Skip to content

Commit a05cf73

Browse files
committed
Create README - LeetHub
1 parent 7f65b82 commit a05cf73

File tree

1 file changed

+44
-0
lines changed
  • 1239-maximum-length-of-a-concatenated-string-with-unique-characters

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<h2><a href="https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters/">1239. Maximum Length of a Concatenated String with Unique Characters</a></h2><h3>Medium</h3><hr><div><p>You are given an array of strings <code>arr</code>. A string <code>s</code> is formed by the <strong>concatenation</strong> of a <strong>subsequence</strong> of <code>arr</code> that has <strong>unique characters</strong>.</p>
2+
3+
<p>Return <em>the <strong>maximum</strong> possible length</em> of <code>s</code>.</p>
4+
5+
<p>A <strong>subsequence</strong> is an array that can be derived from another array by deleting some or no elements without changing the order of the remaining elements.</p>
6+
7+
<p>&nbsp;</p>
8+
<p><strong class="example">Example 1:</strong></p>
9+
10+
<pre><strong>Input:</strong> arr = ["un","iq","ue"]
11+
<strong>Output:</strong> 4
12+
<strong>Explanation:</strong> All the valid concatenations are:
13+
- ""
14+
- "un"
15+
- "iq"
16+
- "ue"
17+
- "uniq" ("un" + "iq")
18+
- "ique" ("iq" + "ue")
19+
Maximum length is 4.
20+
</pre>
21+
22+
<p><strong class="example">Example 2:</strong></p>
23+
24+
<pre><strong>Input:</strong> arr = ["cha","r","act","ers"]
25+
<strong>Output:</strong> 6
26+
<strong>Explanation:</strong> Possible longest valid concatenations are "chaers" ("cha" + "ers") and "acters" ("act" + "ers").
27+
</pre>
28+
29+
<p><strong class="example">Example 3:</strong></p>
30+
31+
<pre><strong>Input:</strong> arr = ["abcdefghijklmnopqrstuvwxyz"]
32+
<strong>Output:</strong> 26
33+
<strong>Explanation:</strong> The only string in arr has all 26 characters.
34+
</pre>
35+
36+
<p>&nbsp;</p>
37+
<p><strong>Constraints:</strong></p>
38+
39+
<ul>
40+
<li><code>1 &lt;= arr.length &lt;= 16</code></li>
41+
<li><code>1 &lt;= arr[i].length &lt;= 26</code></li>
42+
<li><code>arr[i]</code> contains only lowercase English letters.</li>
43+
</ul>
44+
</div>

0 commit comments

Comments
 (0)