vrkorat211's blog

By vrkorat211, history, 4 years ago, In English

Question asked in Google online coding challenge on 22nd AUG, 2020.

Please help me with this question.

You are given a tree with N nodes numbered 1 to N. Each node is having weight Ai. (1 <= i <= N)

Find the maximum path sum between any two node u and v of the tree. Return the maximum path sum value. constraints:

1 <= T <= 10
1 <= N <= 1e4
-1e6 <= Ai <= +1e6

Example:

Full text and comments »

  • Vote: I like it
  • -16
  • Vote: I do not like it

By vrkorat211, history, 5 years ago, In English
  • Vote: I like it
  • -11
  • Vote: I do not like it