Available question text
Given two undirected trees, for each node i in the first tree find the maximum number of nodes (from both trees) that can be within distance ≤ k from i after you add one temporary edge connecting any node in the first tree to any node in the second tree. The core challenge is to use tree distances and radius-count precomputation to evaluate, for each i, the best cross-edge choice efficiently (n,m ≤ 1000).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3372. Maximize the Number of Target Nodes After Connecting Trees I
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source