Given two undirected unweighted graphs, you need to connect two nodes from each graph, so that minimal maximum distance between any two nodes will be minimal, answer is such distance. I am stuck on this, any suggestions ?
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | turmax | 3559 |
| 6 | tourist | 3541 |
| 7 | strapple | 3515 |
| 8 | ksun48 | 3461 |
| 9 | dXqwq | 3436 |
| 10 | Otomachi_Una | 3413 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 153 |
| 3 | Um_nik | 147 |
| 4 | Proof_by_QED | 146 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
Given two undirected unweighted graphs, you need to connect two nodes from each graph, so that minimal maximum distance between any two nodes will be minimal, answer is such distance. I am stuck on this, any suggestions ?
| Name |
|---|



What comes to my mind is that you should choose on each graph the node that has the minimal maximum distance to the farthest (or furthest, English is not my first language) node on their graph, If you connect those 2 that one should be your answer. I don't know the constraints of the problem so I wouldn't if that would fit, but that's my idea.