Algorithm Type: Postorder Tree | Correct?

  • Context: MHB 
  • Thread starter Thread starter barbara
  • Start date Start date
  • Tags Tags
    Algorithm
Click For Summary
SUMMARY

The discussion centers on the identification of a postorder tree structure and its relation to recursive algorithms. Participants confirm that the computation can be expressed as (2*3)+((4*2)-(1+5)), validating the expression derived from the tree. The conversation clarifies the distinction between postorder traversal and postorder trees, emphasizing the relevance of recursion in understanding tree structures.

PREREQUISITES
  • Understanding of postorder traversal in binary trees
  • Familiarity with binary tree structures
  • Basic knowledge of recursion in programming
  • Ability to interpret mathematical expressions derived from tree structures
NEXT STEPS
  • Study the principles of binary tree traversal algorithms
  • Learn about recursion and its applications in tree data structures
  • Explore the differences between various tree traversal methods, including inorder and preorder
  • Investigate how to implement postorder traversal in programming languages like Python or Java
USEFUL FOR

Computer science students, software developers, and anyone interested in understanding tree data structures and recursive algorithms.

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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
Replies
3
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K