Py3 Solution Leveraging Standard BFS/DFS count nodes (k-1) away in tree 2 and (k) away in tree 1 
URL := https://leetcode.com/problems/maximize-the-number-of-target-nodes-after-connecting-trees-i/description/
3372. Maximize the Number of Target Nodes After C
URL := https://leetcode.com/problems/maximize-the-number-of-target-nodes-after-connecting-trees-i/description/
3372. Maximize the Number of Target Nodes After Connecting Trees I

# Intuition and Approach
For each node in tree 2, how many nodes are visitable in distance k-1?
For each node in tree 1, count nodes visitable in distance k
    Add the node with maximal nodes visited - according to distance (k-1) - in tree 2 - to tree 1
    can be any node : think greedily here ( disconnected components ) single edge always needed

# Code
```python3 []
class Solution:
    def maxTargetNodes(self, edges1: List[List[int]], edges2: List[List[int]], k: int) -> List[int]:
        adjListOne = self.makeAdjList(edges1)
        adjListTwo = self.makeAdjList(edges2)
        maxNodesVisitedGraphTwo = 0
        visited = set()
        for nodeTwo, adjNodes in adjListTwo.items():
            numVisitedFromTwo = self.countNodesAtDistance(adjListTwo,visited, nodeTwo, k-1)
            visited.clear()
            maxNodesVisitedGraphTwo = max(maxNodesVisitedGraphTwo, numVisitedFromTwo)
        # oh assuming we fill out for each node in one ( ok careful here ) 
        nodesInOne = []
        for nodeOne, adjNodes in adjListOne.items():
            nodesInOne.append(nodeOne)
        nodesInOne.sort()
        answers = [0 for idx in range(len(nodesInOne))]
        for index, nodeOne in enumerate(nodesInOne):
            numVisitedFromOne = self.countNodesAtDistance(adjListOne, visited, nodeOne, k)
            visited.clear()
            maxVisitedAtNode = numVisitedFromOne + maxNodesVisitedGraphTwo
            answers[index] = maxVisitedAtNode 
        return answers

    # BFS/DFS - 1K nodes at max - shouldn't be to inefficient ( I hope ) ?
    def countNodesAtDistance(self, adjList:dict, visited:set(), root:int, dist:int) -> int:
        criteriaCount = 0
        if(root not in visited and dist >= 0):
            visited.add(root)
            criteriaCount = 1
            children = adjList[root]
            for child in children:
                childDist = dist - 1
                childCount = self.countNodesAtDistance(adjList,visited,child,childDist)
                criteriaCount += childCount
        return criteriaCount

    # we lack nodal counts here, sadly
    # of just use items anyways
    def makeAdjList(self, edges:List[List[int]]) -> dict:
        adjList = dict()
        for [src,dst] in edges:
            if(src not in adjList):
                adjList[src] = set()
            if(dst not in adjList):
                adjList[dst] = set()
            adjList[src].add(dst)
            adjList[dst].add(src)
        return adjList

```
['Depth-First Search', 'Breadth-First Search', 'Python3']