BinaryTree t ← 生成二叉树
time ← 1

# 访问二叉树 t 的节点 u 的函数
inorder(u):
    if u = NIL:
        return
    inorder(t.nodes[u].left)
    L[u] ← time++
    inorder(t.nodes[u].right)

# 从二叉树的根节点开始访问
inorder(t.root)