BinaryTree t ← 二分木を生成
time ← 1  

# 二分木tのノードu を訪問する関数
postorder(u):
    if u = NIL:
        return
    postorder(t.nodes[u].left)
    postorder(t.nodes[u].right)
    L[u] ← time++

# 二分木の根を起点として訪問開始
postorder(t.root)