Company: Salesforce AMTS role On-campus_1july

Difficulty: medium

Problem Statement

A CRM platform lets administrators build parent-child relationships between custom objects, which helps users quickly locate a particular configuration or variation of an object. An administrator wants to compute a performance metric for every variation of one such custom object. The structure forms a hierarchical tree, with the root node being the primary custom object (version 1). Each variation (node) carries a performance score reflecting how effective or heavily used it is. The goal is to work out a metric called the Performance Value for every variation in the tree. For a custom object variation i : If it has no child variations (leaf node), its Performance Value is 0. Otherwise, the Performance Value is the maximum product of scores from two distinct variations in i 's subtree. The subtree of variation i includes i itself and all its descendant variations. Determine the Performance Value for each custom variation object. Example Consider the following tree: The Performance Value

More Salesforce AMTS role On-campus_1july OA questionsInterview experiences