O72

Letter Tile Possibilities

Mid / Senior Engineer
Target Time: 25 - 35 Minutes
Type: NUMERIC

Problem Statement & Objective

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.

Function Signature (Python)

letter_tile_possibilities(tiles: str) -> int

Input & Output Contract

Output Rule:Oluşturulabilecek benzersiz kelime sayısı.

System Constraints

1 <= karolar.length <= 7
karolar büyük İngilizce harfler içerir

Example Execution Walkthrough

karolar = 'AAB' -> 'A', 'B', 'AA', 'AB', 'BA', 'AAB', 'ABA', 'BAA' -> toplam 8

Example Test Scenarios (3)

Example 1
Input:["AAB"]
Expected Output:8
Example 2
Input:["AAABBC"]
Expected Output:188
Example 3: Tek Harf
Input:["V"]
Expected Output:1
Loading Python Editor...
Input Parameters
[
  "AAB"
]
Expected Output
8