14,395 views
10 votes
10 votes
Given a binary tree with n nodes and assuming size(x) denotes the number of nodes in the subtree rooted at the node x,how long does it take,in the worst case to compute size(x) for every node x of the tree? Choose the tightest upper bound.

A-O(height)

B-O(n)

C-O(nlogn)

D-O(n^2)

1 Answer

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
3