討論串[理工] [資結]-政大99-資科所
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
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個字)
內容預覽:
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
下一頁
尾頁