[理工] 98 台大資演
想請問一下各位大大 這程式碼如果要算時間複雜度的話要怎看呢
https://imgur.com/a/sgSyM8h.jpg

小弟的想法是 因為題目有說computing the values of X,Y,Z 為)O(1)
atom()也為O (1)時間
所以就變成 T(n)=max{XT(Y),T(Z)}
但有大神的解答是說 T(N)=XT(Y)+Z
請大神幫忙解答 大家一起加油加油加油
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 27.242.192.242
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1547645373.A.915.html
推
01/17 11:42,
7年前
, 1F
01/17 11:42, 1F
→
01/17 12:40,
7年前
, 2F
01/17 12:40, 2F