题目dfs代码
查看原帖
题目dfs代码
765294
omclude楼主2024/9/4 12:59
dfs_order = []

function dfs(v):
    append v to the back of dfs_order
    pick an arbitrary permutation s of children of v
    for child in s:
        dfs(child)
dfs(1)
2024/9/4 12:59
加载中...