Google | Phone Screen | Brace Expansion
Anonymous User
3016

You are given a string a_{cat,dog}_is_with_{sarah,mike}
Return the outputs as:
a_cat_is_with_sarah
a_cat_is_with_mike
a_dog_is_with_sarah
a_dog_is_with_mike

https://leetcode.com/problems/brace-expansion
https://leetcode.com/problems/brace-expansion-ii

Comments (8)