Python Forum
Binary expression trees
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Binary expression trees
#2
Look at your logic as you walk down the tree:

Am I on an operator?
If so, is the left side empty? (If it is, set the value on the left)
If left side is not empty, make left side the new pointer

At the moment, nothing in the "it is an operator" conditional will examine or redirect to the right. That only happens in the non-operator block.

I'm not sure what logic you're using to create the tree, but you probably need another conditional in there to see if you want to add on the right.
Reply


Messages In This Thread
Binary expression trees - by CristinaSpanoche - Oct-21-2020, 10:22 AM
RE: Binary expression trees - by bowlofred - Oct-23-2020, 08:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using ID3 Estimator for Decision Trees student6306 2 1,472 Jun-15-2023, 04:11 PM
Last Post: student6306

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020