• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

findin what the function does..

 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 198
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic