You are given a list of lists of strings regions, where each list regions[i] defines a containment relationship such that the first region regions[i][0] directly contains all the subsequent regions regions[i][j] for
If region
Given two specific regions region1 and region2, return the smallest region that contains both region1 and region2.
Constraints:
regions.length
regions[i].length
regions[i][j].length, region1.length, region2.length
region1 region2
regions[i][j], region1, and region2 consist of English letters.
The input is generated such that there exists a region which contains all the other regions, either directly or indirectly.
A region cannot be directly contained in more than one region.
You are given a list of lists of strings regions, where each list regions[i] defines a containment relationship such that the first region regions[i][0] directly contains all the subsequent regions regions[i][j] for
If region
Given two specific regions region1 and region2, return the smallest region that contains both region1 and region2.
Constraints:
regions.length
regions[i].length
regions[i][j].length, region1.length, region2.length
region1 region2
regions[i][j], region1, and region2 consist of English letters.
The input is generated such that there exists a region which contains all the other regions, either directly or indirectly.
A region cannot be directly contained in more than one region.