I was asked this in the phone screen for SDE1 in the US.
Give a string, app[1,2].something[3,4].com request to return: app1.something3.com, app2.something3.com, app1.something4 .com, app2.something4.com
follow up : how to change code if the size of the list is unknown [1,2] can be [1,2,3....]
I was confused the entire time. Is there a leetcode equivalent? I vaguely remembered combinations question but I only just barely knew how to solve it if input list is [1,2,3,4] but not when we divide the lists into two