Class Solution
java.lang.Object
g1001_1100.s1079_letter_tile_possibilities.Solution
1079 - Letter Tile Possibilities.<p>Medium</p>
<p>You have <code>n</code> <code>tiles</code>, where each tile has one letter <code>tiles[i]</code> printed on it.</p>
<p>Return <em>the number of possible non-empty sequences of letters</em> you can make using the letters printed on those <code>tiles</code>.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> tiles = “AAB”</p>
<p><strong>Output:</strong> 8</p>
<p><strong>Explanation:</strong> The possible sequences are “A”, “B”, “AA”, “AB”, “BA”, “AAB”, “ABA”, “BAA”.</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> tiles = “AAABBC”</p>
<p><strong>Output:</strong> 188</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> tiles = “V”</p>
<p><strong>Output:</strong> 1</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= tiles.length <= 7</code></li>
<li><code>tiles</code> consists of uppercase English letters.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
numTilePossibilities
-