NeetCode #651LC-3203HardAdvanced Graphs
← Back to All Problems#651 · #3203 · Find Minimum Diameter After Merging Two Trees(合并两棵树后的最小直径)
📌 Problem Statement & Constraints
You are given two trees described by
edges1 and edges2. You must add exactly one edge connecting a node of the first tree to a node of the second. Return the minimum possible diameter of the resulting tree. Constraints: 1 <= number of nodes <= 10^5.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!