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)