一、若已知一個二元樹(binary tree)的節點數(node)總共有 305 個,且有 104 個樹葉 節點(leaf node),試求出分支度(degree of branch)為 1 的節點數有多少個?(10 分)
詳解 (共 1 筆)
詳解
公式:
n0=n2+1
ntotal=n0+n1+n2
題目給:
no=104
ntotal=305
可求出:
n2=104
n1=103