討論串[理工] [資結]-政大99-資科所
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓16(16推 0噓 13→)留言29則,0人參與, 最新作者stevenwin (袋哥)時間14年前 (2010/03/06 16:10), 編輯資訊
1
0
0
內容預覽:
1. What is the complexity of inorder traversal of binary tree ?. a. O(n). b. O(n^2). c. O(logn). d. O(nlogn). 2. Which of the algorithm has stack prop
(還有163個字)

推噓1(1推 0噓 4→)留言5則,0人參與, 最新作者crazykk (JK)時間14年前 (2010/03/06 17:37), 編輯資訊
0
0
0
內容預覽:
Ans:a.. 因為inorder traversal一般採用遞迴來解. best case:當binary tree是complete binary tree時. T(n)=2T(n/2)+1=O(n). worst case:當binary tree是skew binary tree時. T(n
(還有167個字)
首頁
上一頁
1
下一頁
尾頁