Maximum path for each node

Revision en2, by loverBoUy, 2021-11-15 20:47:05

Hello!

Given a binary tree, find a** maximum path for each node**.

Hope to get an optimal solution Input- N=6

edges= 1->2,2->3,1->4,4->5,4->6

output= 2 3 4 3 4 4

Thanks in advance!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English loverBoUy 2021-11-15 20:47:05 71
en1 English loverBoUy 2021-11-15 20:43:29 157 Initial revision (published)