Maximum Path Sum with Conditional Node Processing
Given a binary tree with integer node values, calculate path sums where odd-valued nodes trigger alternate node summation and even-valued nodes sum all nodes to leaf. Return the maximum sum among all possible paths.
Asked at:
Oracle
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid October, 2025
Oracle
Senior
Given a binary tree with each node having an integer value. If the value of the node is odd, sum values of alternate nodes and if the value is even, sum values of all the nodes till the leaf node. Return the max sum from all the paths.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.