Q: 敘述何謂二分搜尋法?自己設一個數列來做舉例,並告訴我二分搜尋怎麼使用。
還有何謂二元樹(binary tree)?並舉例作圖~
在資料結構中,二元樹是指樹中的每一個「節點」(Nodes)最多只能擁有2個子節點,即分支度小於或等於2。

Q: 敘述何謂二分搜尋法?自己設一個數列來做舉例,並告訴我二分搜尋怎麼使用。
還有何謂二元樹(binary tree)?並舉例作圖~
在資料結構中,二元樹是指樹中的每一個「節點」(Nodes)最多只能擁有2個子節點,即分支度小於或等於2。
Q:何謂 Overhead ?
A:
簡言之,意思為"額外"開銷。
不過意思可能還是很模糊,所以來簡單舉生活例子說明-
我們有時問人:你出門吃中飯花多少時間? 你也許回答:半小時。
但實際上吃中飯可能只花了15分鐘,而剩餘的15分鐘用在來回去餐廳的路程時間、等餐點的時間...等,
這段除了吃中飯外包含的15分鐘,通常可稱為Overhead。
ps:
Indirect expenses of running a business not directly associated with a particular item or service sold. For example, wages paid to factory workers and the cost of production materials are direct costs. Electricity, insurance, and benefits paid to workers are overhead expenses. By applying a factor called the burden rate, cost accounting attempts to allocate overhead, where possible, to the cost of goods sold.
Read more: http://www.answers.com/topic/overhead#ixzz276zAtFFF
By 教授給的www.answers.com去搜尋Overhead所搜尋的其中一段
HW1 設定類似雞兔同籠問題,並用"數學"和"算術方式來解答。
Q:今天聚餐有大人,小孩共10人來吃10個饅頭,大人1人吃3個,小孩2人吃1個,問大人和小孩分別有幾個 ?
Ans:
運用"數學"解答-
假設大人有 X 位 , 小孩有 Y 位,
那麼可列出聯立方程式 3X + Y/2 =10
X+Y=10
解出此聯立方程式後,得知 X=2 ,Y=8 故大人有2位,小孩有8位。
運用"算數"解答-
一個一個來判斷當大人幾位,小孩幾位時,吃的饅頭數量。
大人 | 小孩 | 吃的饅頭總數 |
1 | 9 | 1*3 + 9/2 =7.5 |
2 | 8 | 2*3 + 8/2 =10 |
3 | 7 | 3*3 + 7/2 =12.5 |
4 | 6 | 4*3 + 6/2 =15 |
5 | 5 | 5*3 + 5/2 =17.5 |
6 | 4 | 6*3 + 4/2 =20 |
7 | 3 | 7*3 + 3/2 =22.5 |
8 | 2 | 8*3 + 2/2 =25 |
9 | 1 | 9*3 + 1/2 =27.5 |
故答案為 有2位大人,8位小孩。