Bird
Raised Fist0

Given the partial output list from letter case permutation: ['a1b', 'a1B', 'A1b', 'A1B'], which of the following was the original input string?

hard🔄 Reverse Engineer Q9 of Q15
Subsets & Combinations - Letter Case Permutation
Given the partial output list from letter case permutation: ['a1b', 'a1B', 'A1b', 'A1B'], which of the following was the original input string?
A"a1B"
B"a1b"
C"A1b"
D"A1B"
Step-by-Step Solution
Solution:
  1. Step 1: Analyze output variations

    Output toggles cases of 'a' and 'b', digits unchanged.
  2. Step 2: Identify original input

    Original input must be lowercase letters 'a' and 'b' with digit '1' unchanged -> "a1b".
  3. Final Answer:

    Option B -> Option B
  4. Quick Check:

    Output permutations match toggling letters in "a1b" [OK]
Quick Trick: Original input matches lowercase letters in output base [OK]
Common Mistakes:
MISTAKES
  • Assuming uppercase input
  • Confusing output permutations with input
Trap Explanation:
PITFALL
  • Candidates often mistake output permutations as original input variants.
Interviewer Note:
CONTEXT
  • Tests reasoning backwards from output to input
Master "Letter Case Permutation" in Subsets & Combinations

3 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Subsets & Combinations Quizzes