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?

  • 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.
Try Our AI Interviewer

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

Try AI Interview Now

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..