wood burning stoves 2.0*
The moose likes Java in General and the fly likes How to find Path with Max weight Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to find Path with Max weight" Watch "How to find Path with Max weight" New topic

How to find Path with Max weight

Harry Singh
Ranch Hand

Joined: May 02, 2001
Posts: 124
Hi Guru's,

I have created a tree with all the tree nodes and then stored everything in TreeMap and this way i have created a tree with each tree node having refernce to its parent and children...

So can anyone tell me ho can i traverse this tree to find the maximum weight (profit)by following path in the tree...

Class Tree Node is

and i am constructing a Tree as

so can Anyone telll me how can i find a path which is having max weight..i Actually dont need a path, i just need to get max weight (profit)..

Any ideas...
I agree. Here's the link: http://aspose.com/file-tools
subject: How to find Path with Max weight
Similar Threads
really need some help here concerning treeNode data types and the like. (data type issues really)
Trees in Java
trying to get a richfaces tree to populate nodes using data from xml
Richfaces tree binding does not seem to work?
TreeNode ClassCastException?