O72
Letter Tile Possibilities
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) -> intInput & Output Contract
Output Rule:Oluşturulabilecek benzersiz kelime sayısı.
System Constraints
1 <= karolar.length <= 7
karolar büyük İngilizce harfler içerirExample Execution Walkthrough
karolar = 'AAB' -> 'A', 'B', 'AA', 'AB', 'BA', 'AAB', 'ABA', 'BAA' -> toplam 8Example Test Scenarios (3)
Example 1
Input:
["AAB"]Expected Output:
8Example 2
Input:
["AAABBC"]Expected Output:
188Example 3: Tek Harf
Input:
["V"]Expected Output:
1