Coding

Given a tree, write a function to return the sum of the max-sum path which goes through the root node.

Data Scientist

Reddit

Meta

Paytm

LendingClub

Dell

eToro

Did you come across this question in an interview?


Your answer

Try Free AI Interview

Google logo

Google

Product Manager

Prepare for success with realistic, role-specific interview simulations.

Product Strategy
Meta logo

Meta

Product Manager

Prepare for success with realistic, role-specific interview simulations.

Product Sense
Meta logo

Meta

Engineering Manager

Prepare for success with realistic, role-specific interview simulations.

System Design
Amazon logo

Amazon

Data Scientist

Prepare for success with realistic, role-specific interview simulations.

Behavioral
  • Given a tree, write a function to return the sum of the max-sum path which goes through the root node.
  • Determine the sum of the maximum sum path that passes through the root of a given tree.
  • Find the maximum sum path that goes through the root of a tree and return its sum.
  • Compute the sum of the maximum sum path that goes through the root in a tree.
  • What is the sum of the maximum sum path that goes through the root of a given tree?
  • Write a function to find the maximum sum path that goes through the root of a tree and return its sum.
  • Given a tree, find the maximum sum path through the root and return its sum.
  • In a given tree, determine the sum of the maximum sum path that goes through the root.
  • Return the sum of the maximum sum path that goes through the root of a given tree.
  • Find the maximum sum path that goes through the root of a tree and calculate its sum.
  • Calculate the sum of the maximum sum path that goes through the root node in a tree.

Interview question asked to Data Scientists interviewing at Duolingo, Dell, Reddit and others: Given a tree, write a function to return the sum of the max-sum path which goes through the root node..