Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-21-2011, 11:54 PM   PM User | #1
brandNewCoder
New to the CF scene

 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
brandNewCoder is an unknown quantity at this point
Using Trees

How would I go about representing the following image in code? I have a slight understanding of trees and I know how I WOULD evaluate the bottom branch in order to get a value of 1 or 0, but I have no idea how I would pass that value up the tree. At this point I do no have any code for creating the tree.

brandNewCoder is offline   Reply With Quote
Old 04-22-2011, 02:53 AM   PM User | #2
starts
New to the CF scene

 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
starts has a little shameless behaviour in the past
use foreach

Last edited by vinyl-junkie; 04-22-2011 at 03:26 AM.. Reason: Signatures only allowed through the control panel
starts is offline   Reply With Quote
Old 04-22-2011, 03:06 AM   PM User | #3
MatthewABlack
New to the CF scene

 
Join Date: May 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
MatthewABlack is an unknown quantity at this point
I don't see how "use foreach" even close to answers my question. I'm not asking for an alternative.
MatthewABlack is offline   Reply With Quote
Old 04-22-2011, 03:17 AM   PM User | #4
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
Quote:
Originally Posted by MatthewABlack View Post
I don't see how "use foreach" even close to answers my question. I'm not asking for an alternative.
i'm confuse about what you asked, you don't know how to implement the tree structure, how to populate the tree with utility values or how to use minimax to solve the problem?

best regards
oesxyl is offline   Reply With Quote
Old 04-22-2011, 03:46 AM   PM User | #5
MatthewABlack
New to the CF scene

 
Join Date: May 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
MatthewABlack is an unknown quantity at this point
Hey thanks for the Reply. Sorry about name change, I am OP but didn't see my friends account logged on. I believe I am capable of implementing/populating but am just unsure of how to retrieve the values and "pass up" the values to higher layers like the image displays. I have code from lecture regarding in order, preorder, and post order traversing but I doesn't seem like it would accomplish the task at hand.
MatthewABlack is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:06 PM.


Advertisement
Log in to turn off these ads.