MHB Algorithm Type: Postorder Tree | Correct?

  • Thread starter Thread starter barbara
  • Start date Start date
  • Tags Tags
    Algorithm
barbara
Messages
10
Reaction score
0
+

/ \

/ \

* -

/ \ / \

2 3 * +

/ \ / \

4 2 1 5


What type of algorithm is this I think the computation can be expressed as (2*3)+((4*2)-(1+5)). is this correct. I know its a postorder tree I just don't know if a left or right subtree exists Print root end. Does it anything to do with recursion or repetition
 
Last edited:
Physics news on Phys.org
Code:
           +

       /       \

      /         \

      *            -

     /  \       /     \

    2   3      *       +

             /  \     /  \

            4   2    1   5

barbara said:
What type of algorithm is this
This is not an algorithm.

barbara said:
I think the computation can be expressed as (2*3)+((4*2)-(1+5)).
Yes.

barbara said:
I know its a postorder tree
What is a postorder tree? I know what a postorder traversal is, but not sure about a postorder tree.

barbara said:
I just don't know if a left or right subtree exists Print root end.
I can't parse this sentence.

barbara said:
Does it anything to do with recursion or repetition
There is some connection.
 
Namaste & G'day Postulate: A strongly-knit team wins on average over a less knit one Fundamentals: - Two teams face off with 4 players each - A polo team consists of players that each have assigned to them a measure of their ability (called a "Handicap" - 10 is highest, -2 lowest) I attempted to measure close-knitness of a team in terms of standard deviation (SD) of handicaps of the players. Failure: It turns out that, more often than, a team with a higher SD wins. In my language, that...
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...

Similar threads

Replies
3
Views
2K
Replies
3
Views
2K
Replies
4
Views
1K
Replies
4
Views
1K
Replies
16
Views
2K
Replies
1
Views
1K
Replies
5
Views
2K
Replies
6
Views
2K
Back
Top