資料結構›Ch5 樹狀結構第 13 題/共 48 題
13. Binary Tree、遞迴、樹高
#DS-05-013易Binary Tree遞迴樹高
Write a recursive function to calculate the height of a binary tree. Note: A node in a binary tree has two pointers, named 'left' and 'right', respectively, where the 'left' pointer is used to find the left child of the node and the 'right' pointer is used to find the right child. Your function will take a node as the input and return an integer.
📄 台大111
▤完整推導請見《WH 資工筆記 · 資料結構》Ch5 樹狀結構