1079. Letter Tile Possibilities
1079. Letter Tile Possibilities
Description
You have n``tiles, where each tile has one letter tiles[i] printed on it.
Return the number of possible non-empty sequences of letters you can make using the letters printed on those tiles.
Example 1:
1 | Input: tiles = "AAB" |
Example 2:
1 | Input: tiles = "AAABBC" |
Example 3:
1 | Input: tiles = "V" |
Constraints:
1 <= tiles.length <= 7tilesconsists of uppercase English letters.
Hints/Notes
- 2025/03/30 Q2
- backtracking, check approach 3
- Leetcode solution
Solution
Language: C++
1 | class Solution { |