• Post Reply Bookmark Topic Watch Topic
  • New Topic

findin what the function does..  RSS feed

 
alex lotel
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there is class NODE:


And there is this code max (int a, int b) returns the biggest number amongst a,b , max (int a, int b, int c) returns the biggest number amongst a,b,c



what does function what does if "t" is the root of a binary tree
?


how i tried to solve it:
i see that function "f" calculates that longest path to a leaf
but i cant see what function "what" does?
 
Manoj Kumar Jain
Ranch Hand
Posts: 198
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry but you code seems to be very confusing to me because it not properly formatted and also methods name are not very clear

"What" function is recursively going in to the each node and getting the maximum value among all the nodes and their child nodes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!