put (a<d) AND (b<c) AND (c<d) into an expression tree

This is a discussion on put (a<d) AND (b<c) AND (c<d) into an expression tree within the C Programming forums, part of the General Programming Boards category; This is a C data structure thing. Would the proper representation of this be: Code: AND / \ / \ ...

  1. #1
    Registered User mlupo's Avatar
    Join Date
    Oct 2001
    Posts
    72

    put (a<d) AND (b<c) AND (c<d) into an expression tree

    This is a C data structure thing.

    Would the proper representation of this be:
    Code:
                AND
               /  \
              /    \
             <     AND
            /\      /\
           a  d    <  \
                  /\   <
                 b  c  /\
                      c  d

    Thanks,
    Mike
    Last edited by mlupo; 12-02-2002 at 09:19 PM.
    NEVER PET YOUR DOG WHILE IT'S ON FIRE!

  2. #2
    Registered User
    Join Date
    Dec 2002
    Posts
    221
    traveresed which way?

  3. #3
    Registered User mlupo's Avatar
    Join Date
    Oct 2001
    Posts
    72
    Was not specified.
    NEVER PET YOUR DOG WHILE IT'S ON FIRE!

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Was not specified.
    Then yes. That lack of detail gives you quite a bit of wiggle room.

    -Prelude
    My best code is written with the delete key.

  5. #5
    Registered User mlupo's Avatar
    Join Date
    Oct 2001
    Posts
    72
    Thanks for the confirmation.
    It's appreciated.

    Mike
    NEVER PET YOUR DOG WHILE IT'S ON FIRE!

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21