Finding all possible value combinations between two arrays
问题 I have two arrays of strings, not necessarily of the same length, I want to find all the possible "sets" of combinations between two values from the arrays, without repeats from either array. For example, given the arrays: { "A1", "A2", "A3" } { "B1", "B2" } The result I want is the following sets: { ("A1", "B1"), ("A2", "B2") } { ("A1", "B1"), ("A3", "B2") } { ("A1", "B2"), ("A2", "B1") } { ("A1", "B2"), ("A3", "B1") } { ("A2", "B1"), ("A3", "B2") } { ("A2", "B2"), ("A3", "B1") } My general