Answered step by step
Verified Expert Solution
Question
1 Approved Answer
. lfs given sode-18 in the above picture, it should return -1 13 Marks) b. Write a preudocode which returns list of root nodes of
. lfs given sode-18 in the above picture, it should return -1 13 Marks) b. Write a preudocode which returns list of root nodes of subtrees of a given binary that satisfies given sum property. For example: If sum=36, for the above diagram. It should return list with node 4, as it satisfies the condition (sum of all elements = 36). . If yum*22, for the above diagram. It should returns list with node 10, as it satisfies the condition (sum of all elements 22) 3. If sum13, for the above diagram. It should return null Marks) For a given binary tree 2022/01 16 10 2. Write a pseudocode to calculate sum of value of children nodes of a given node. For example: 1. If a given node= 4 in the above picture, it should return 32. 2. If a given node-3 in the above picture, it should return 0. . 3. If a given node=18 in the above picture, it should return -1. 13 Marks
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started