資料結構筆記 4 – Binary Tree (二元樹)
Binary tree 是定義更狹窄的 tree,一棵 binary tree 的定義如下:
Binary tree 是定義更狹窄的 tree,一棵 binary tree 的定義如下:
Tree 是最常見的 non-linear data structure,構成 tree 的基本單位為 node,以下為 tree 的定義
Stack (堆疊) 和 queue (佇列) 可以說是 array 和 linked-list 的閹割版本,因此個別都可以用 array 和 linked-list 來實現。
資料結構大致上可以分為 linear 和 non-linear 兩種類別,其中 linear data structure 包含 array, linked-list stack, queue, non-linear data structure 包含 trees, graphs。