Given few football teams. These teams belong to different countries and different groups. This will be given as a list of list in input (not list of pairs). Teams from same country and same team can't compete with each other.
You need to return pair of each team which can compete with other.
Country {
italy: [1,2],
Germany: [3,4],
}
Groups: {
[1,4], [2,3]
}Ans :
[
[1,3], [2,4]
]
What do you think is the most optimal approach?