Question: Suppose T is a binary tree that stores an integer key value in each node. Assume the following notation/operations on a binary tree * the

Suppose T is a binary tree that stores an integer key value in each node. Assume the following notation/operations on a binary tree * the key T.key is the root node's integer key value . the left child ?.left is T's left subtree, which is possibly an empty tree (or null) . the right child T.right is T's right subtree, which is possibly an empty tree (or null) (a) Write an efficient algorithm FindMAxPrODuCT(T) in pseudocode that returns the max imum product of the key values on all possible paths in the tree T, which is passed as the input to the function For the tree below, your algorithm should return a value of 240 (from the path with key values 5 -2 3 4-2 3 -2 -2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
