Given a string s, return all possible strings we can make by changing each letter case independently. Pattern focus: Bitmask Enumeration. Each alphabetic character can be toggled like a bit choice, while digits remain fixed.
s = alphanumeric string
all case permutations of s
Example 1:
Input:
s = "a1b2"
Output:
["a1b2","a1B2","A1b2","A1B2"]
Explanation:
Each letter can be uppercase or lowercase independently.
Example 2:
Input:
s = "3z4"
Output:
["3z4","3Z4"]
Explanation:
Only the letter z changes case.