資結 時間複雜度

看板Grad-ProbAsk作者 (晴朗夜晚)時間7年前 (2018/12/06 18:00), 編輯推噓1(101)
留言2則, 2人參與, 7年前最新討論串2/2 (看更多)
Printing out the values stored in all the leaves of a binary search tree containing N elements. 解答是給O(N) 想請問版上高手可以幫忙看一下這題 為什麼不是O(n log n)? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.139.137.139 ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1544090449.A.E39.html

12/06 18:07, 7年前 , 1F
中序搜尋遇到leaf再印
12/06 18:07, 1F

12/06 18:36, 7年前 , 2F
懂了!!謝謝T大
12/06 18:36, 2F
文章代碼(AID): #1S2FDHuv (Grad-ProbAsk)
文章代碼(AID): #1S2FDHuv (Grad-ProbAsk)