二元樹特性問題 - 考試

By Robert
at 2014-04-02T13:04
at 2014-04-02T13:04
Table of Contents
請益一下,二元搜尋找到最大值,可以使用以下範例去證明之嗎。說明根的特性。
int left_child(int index) {return index * 2;}
int right_child(int index) {return index * 2 + 1;}
void binary_tree()
{
int tree[5 + 1];
cout << "根為" << tree[1];
cout << "根的左邊小孩是" << tree[left_child(1)];
cout << "根的右邊小孩是" << tree[right_child(1)];
}
--
Tags:
考試
All Comments

By Gary
at 2014-04-04T04:43
at 2014-04-04T04:43

By Belly
at 2014-04-05T06:59
at 2014-04-05T06:59

By Harry
at 2014-04-08T17:05
at 2014-04-08T17:05

By Agatha
at 2014-04-10T00:55
at 2014-04-10T00:55

By Charlotte
at 2014-04-11T17:39
at 2014-04-11T17:39

By Connor
at 2014-04-12T01:07
at 2014-04-12T01:07

By Donna
at 2014-04-15T22:39
at 2014-04-15T22:39

By Rosalind
at 2014-04-19T04:53
at 2014-04-19T04:53

By Genevieve
at 2014-04-20T17:47
at 2014-04-20T17:47

By Todd Johnson
at 2014-04-21T12:44
at 2014-04-21T12:44
Related Posts
桃園捷運招考

By Freda
at 2014-04-02T12:57
at 2014-04-02T12:57
錯誤更正-淨利&保留盈餘

By Yedda
at 2014-04-02T11:37
at 2014-04-02T11:37
三相電路之線(相)電壓(流)

By Dorothy
at 2014-04-02T05:01
at 2014-04-02T05:01
民訴聽陳旭還是玄羽?

By Lauren
at 2014-04-02T01:54
at 2014-04-02T01:54
請問一帆補習班決勝班師資

By Donna
at 2014-04-02T01:43
at 2014-04-02T01:43