I’m trying to figure out how to create a complex loop but I don’t find any solutions.
I have 2 tables and each of which can seat arbitrary amount of people.
I would like to create a loop to get all possibilities where I can put the people!
Each person are represented by an ID for example for 5 peoples.
each of digits are the person’s ID.
I need to know what are the possible ways to seat the people!
table1 table2
(nobody) 12345
1 2345
2 1345
3 1245
4 1235
5 1234
12 345
13 245
14 235
15 234
23 145
24 135
25 134
34 125
35 124
45 123
1 Answer