find multiplication of sums of data of leaves at same level.
Answers
Answered by
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
Science,
6 months ago
Business Studies,
6 months ago
Social Sciences,
6 months ago
History,
1 year ago
English,
1 year ago