Tap here to switch tabs
Problem
Submissions

Problem: Letter Case Permutation

Letter Case Permutation asks you to return every string formed by changing each letter independently to lowercase or uppercase while leaving digits unchanged.

Statement

Given a string, s, consisting of letters and digits, generate all possible variations by modifying each letter independently to be either lowercase or uppercase while keeping the digits unchanged. Each letter in the s string can appear in both cases across different variations, resulting in multiple possible combinations. Return a list containing all such variations in any order.

Constraints:

  • 1≤1 \leq s.length ≤12\leq12

  • s consists of lowercase English letters, uppercase English letters, and digits.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Letter Case Permutation

Letter Case Permutation asks you to return every string formed by changing each letter independently to lowercase or uppercase while leaving digits unchanged.

Statement

Given a string, s, consisting of letters and digits, generate all possible variations by modifying each letter independently to be either lowercase or uppercase while keeping the digits unchanged. Each letter in the s string can appear in both cases across different variations, resulting in multiple possible combinations. Return a list containing all such variations in any order.

Constraints:

  • 1≤1 \leq s.length ≤12\leq12

  • s consists of lowercase English letters, uppercase English letters, and digits.