師大資工系ACM-ICPC讀書會:肆、鏈結串列與二元樹

Maplewing
December 06, 2013

 師大資工系ACM-ICPC讀書會:肆、鏈結串列與二元樹

師大資工系ACM-ICPC讀書會:肆、鏈結串列與二元樹

Maplewing

December 06, 2013

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

21 slides
  1. 刪除節點 22 12 32 node node.next node.next.next node *delnode =

    node.next; node.next = node.next.next; delete delnode;
  2. • 陣列 • 以0為root • 往編號n之左子樹:2*(n+1) - 1 • 往編號n之右子樹:2*(n+1)

    • 往父節點:floor((n-1)/2) • 鏈結串列 • struct node { int data; node *left, *right; }; 儲存方式

More Decks by Maplewing

Other Decks in Programming