Computer Science, asked by ainisafiyyah1708, 10 months ago

find multiplication of sums of data of leaves at same level.

Answers

Answered by KeshavGiri79
0

Answer:

One Simple Solution is to recursively compute leaf sum for all level starting from top to bottom. Then multiply sums of levels which have leaves. Time complexity of this solution would be O(n2). An Efficient Solution is to use Queue based level order traversal.

Similar questions