高普考題庫
108 年 108年公務人員高等考試三級考試暨普通考試・資料結構
申論 1給予如下二元樹節點的宣告,分別寫出C 的遞迴程式計算二元樹節點個數及計算二元樹葉節點(leaves)個數(Count the number of nodes in abinary tree and count the number of leaf nodes in a binary tree,respectively)。(25 分)struct node{int info;struct node *left;struct node *right;}typedef struct node *NODEPTR;void countTree(NODEPTR tree){}void countLeaves(NODEPTR tree){}