Re: [理工] [DS]-幾題小問題
※ 引述《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
: : 請問一下這題該怎麼算阿?我本來是想log(1000+1)=10..但是沒這個答案= =
: : 三、如果要把(A+B^C^D*E)/F/(G*H)轉成後序最少需要幾個stack?
: : 我怎麼畫都是三個耶..可以指導一下嗎XD
: 我怎麼畫都是4個耶
: 最多的時候stack : ( + ^ ^
我想問一下 不是優先權值相同 stack內的就要輸出嗎?
我畫成後序的時候可以判斷出來是需要四個
指是不知道為甚麼予許相同優先權相疊 是因為^是右相關嗎?
: : 四、26,5,3,1,4,7,30,33,35,12 畫成 min leftist heap?
: : 問題有點多..麻煩了~感謝!
: 這題答案給的是錯的,但我也不確定我畫得是否正確
: 請別的高手回答
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.32.183.45
→
01/09 05:47, , 1F
01/09 05:47, 1F
討論串 (同標題文章)