第11774题 单选题
给定按层序排列的二叉搜索树节点数组[5,3,7,2,4,6,8],求给定遍历代码的输出结果

构建该数组的二叉搜索树后,采用如下代码实现的遍历方式,得到的输出是( )。

def traversal(tree_node* root) :
    if (root == nullptr) {
        return
    }
traversal(root->left)
print(root->val)
print(" ")
traversal(root->right)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析