Results 1 to 4 of 4
  1. #1
    hydride is offline Member
    Join Date
    Jan 2010
    Posts
    15
    Rep Power
    0

    Default Find the value of the arithmetic expression...

    Hey guys, so the question is: Find the value of the arithmetic expression associated with each subtree of the binary tree below.

    I just don't know what it's asking me to do. Someone please explain. Thank you.


  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,658
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by hydride View Post
    Hey guys, so the question is: Find the value of the arithmetic expression associated with each subtree of the binary tree below.

    I just don't know what it's asking me to do. Someone please explain. Thank you
    The image you've shown us most definitely has nothing to do with a binary tree; it just describes a post order traversal of any tree. You have to evaluate a binary expression tree. First recursively evaluate the children of a node and keep the results; next evaluate the current node and return the result.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Cbani is offline Member
    Join Date
    Jan 2010
    Posts
    90
    Rep Power
    0

    Default

    click on the image to see the tree

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,658
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Cbani View Post
    click on the image to see the tree
    When I click on that image I see the same tree (and a bunch of popups) and that tree has nothing to do with an expression tree.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Arithmetic using doubles
    By Black_Eye in forum New To Java
    Replies: 4
    Last Post: 10-19-2010, 08:35 AM
  2. Abbreviated Arithmetic
    By SweetLD215 in forum New To Java
    Replies: 19
    Last Post: 10-13-2010, 12:46 AM
  3. Replies: 9
    Last Post: 07-17-2010, 01:21 PM
  4. Polynomials Arithmetic
    By thisisIT in forum New To Java
    Replies: 3
    Last Post: 03-09-2010, 01:27 PM
  5. I can't find the right regular expression
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •