看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《polomoss (小澤)》之銘言: : ※ 引述《assassin88 (AI)》之銘言: : : 一、In binary tree, the number of null pointers is more than one unit than : : the number of nun-null pointers. : : 這題不是應該是True嗎? no=n2+1? : 你沒有考慮n1的點數,non-null包括n1,所以不會差1 : : 二、What's max number of comparison when we search of an item in AVL tree with : : 1000 nodes. : 用費氏數列去算,F h+2 -1 <=1000 ,h=14 這個我知道,我當初有想到,可是題目沒有指名root是0還是1,算出來答案不會不同? : : 請問一下這題該怎麼算阿?我本來是想log(1000+1)=10..但是沒這個答案= = : : 三、如果要把(A+B^C^D*E)/F/(G*H)轉成後序最少需要幾個stack? : : 我怎麼畫都是三個耶..可以指導一下嗎XD : 我怎麼畫都是4個耶 : 最多的時候stack : ( + ^ ^ : : 四、26,5,3,1,4,7,30,33,35,12 畫成 min leftist heap? : : 問題有點多..麻煩了~感謝! : 這題答案給的是錯的,但我也不確定我畫得是否正確 : 請別的高手回答 畫出來是這個樣子嗎?有請高手幫忙確認一下。 1 / \ 4 3 / \ / \ 7 30 12 5 / \ / 35 33 26 跟給的答案似乎不同...Orz -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.57.104.54 ※ 編輯: assassin88 來自: 61.57.104.54 (01/08 23:47)
polomoss:錯了,左傾樹要往左傾斜...shortest左子>右子 01/09 00:14
assassin88:>=吧,有哪一點不符嗎? 01/09 00:40
polomoss:忘了>= 01/09 00:52