第26839题 单选
Python实现二叉树BFS查找目标节点的代码横线处应填入哪项?

以下代码实现了二叉树的广度优先搜索(BFS),并查找特定值的节点。横线上应填写( )。

from collections import deque

class TreeNode:
    def __init__(self, val=0, left=None, right=None):
        self.val = val
        self.left = left
        self.right = right

def find_node(root, target):
    if root is None:
        return None

    q = deque()
    q.append(root)

    while q:
        current = q.popleft()

        if current.val == target:
            return current
    __________________
    return None
A
if current.left:
    q.append(current.right)
if current.right:
    q.append(current.left)
B
if current.left:
    q.append(current.left)
if current.right:
    q.append(current.right)
C
if current.left:
    q.append(current)
if current.right:
    q.append(current.right)
D
if current.left:
    q.append(current.left)
if current.right:
    q.append(current)