作者style78432 (Rain stop)
看板Grad-ProbAsk
標題[理工]
時間Thu Dec 3 22:36:17 2020
total=0
void Count(list,temp)
If(list=null) return 0
list->value=temp
Count(list->Lchild, temp+1)
Count(list->Rchild, temp+1)
total=total+list->value
https://i.imgur.com/OpVDq5V.jpg
想問一下pseudo code 這樣寫可以嗎
單純算內部路徑長的話
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.76.251.95 (臺灣)
※ 文章網址: https://webptt.com/m.aspx?n=bbs/Grad-ProbAsk/M.1607006179.A.9A5.html
※ 編輯: style78432 (42.76.251.95 臺灣), 12/03/2020 22:36:45