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)