Class Solution
java.lang.Object
g0501_0600.s0522_longest_uncommon_subsequence_ii.Solution
522 - Longest Uncommon Subsequence II.<p>Medium</p>
<p>Given an array of strings <code>strs</code>, return <em>the length of the <strong>longest uncommon subsequence</strong> between them</em>. If the longest uncommon subsequence does not exist, return <code>-1</code>.</p>
<p>An <strong>uncommon subsequence</strong> between an array of strings is a string that is a <strong>subsequence of one string but not the others</strong>.</p>
<p>A <strong>subsequence</strong> of a string <code>s</code> is a string that can be obtained after deleting any number of characters from <code>s</code>.</p>
<ul>
<li>For example, <code>"abc"</code> is a subsequence of <code>"aebdc"</code> because you can delete the underlined characters in <code>"aebdc"</code> to get <code>"abc"</code>. Other subsequences of <code>"aebdc"</code> include <code>"aebdc"</code>, <code>"aeb"</code>, and <code>""</code> (empty string).</li>
</ul>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> strs = [“aba”,“cdc”,“eae”]</p>
<p><strong>Output:</strong> 3</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> strs = [“aaa”,“aaa”,“aa”]</p>
<p><strong>Output:</strong> -1</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>2 <= strs.length <= 50</code></li>
<li><code>1 <= strs[i].length <= 10</code></li>
<li><code>strs[i]</code> consists of lowercase English letters.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
findLUSlength
-