[問題]幾個關於資料結構的疑問
大家好,
最近在做資料結構的練習,但有一些疑問,還請各位前輩指點,謝謝!
1. In a complete binary tree, what is the index number of the parent of
the node numbered 20?
Ans: 9 (為什麼不是10?)
2. How many comparisons would the insertion sort make on an array of
10 elements that is already in ascending order?
Ans: 7 (為什麼不是9?)
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.116.28.98
※ 文章網址: https://www.ptt.cc/bbs/Prob_Solve/M.1512351989.A.0F2.html
→
12/04 10:26,
6年前
, 1F
12/04 10:26, 1F
推
12/04 13:17,
6年前
, 2F
12/04 13:17, 2F
※ 編輯: smilesaline (42.116.28.98), 12/04/2017 15:56:44
推
12/05 04:18,
6年前
, 3F
12/05 04:18, 3F
→
12/05 04:19,
6年前
, 4F
12/05 04:19, 4F