# Tag Info

Accepted

Recursion ...
• 270k
Accepted

### How to make a postordered ReplaceAll that operates just once per subtree?

Based on my understanding of the question, you want to apply the rule to any expression, provided it wouldn't match any of its subexpressions. You can implement this traversal yourself quite easily ...
• 8,734

### How to perform a breadth-first traversal of an expression?

I don't sure this will look as a duplicated version with Sjoerd C. de Vries in here,but there are some trick function can make you life ease and simplify that answer.So I post this answer still. Build ...
• 26.3k
Accepted

### How to mark leaves of polynomial based on its position in tree

Here's a first attempt, I wouldn't be surprised if a sufficiently complicated monomial group fails to expand under this: First, a helper function: We need to be able to determine the order of a ...
• 9,343

### a function to extract all subexpressions from an expression

Second answer The OP's desired order: ...
• 233k

### Visiting nodes in a tree bottom up

If it is okay for the properties to be updated in a post-order depth-first traversal, you can use TreeFold: ...
• 404
1 vote

### How to mark leaves of polynomial based on its position in tree

MinimumVertexColoring Constructing an adjacency graph (two variables are adjacent if they appear in the same term in the expansion of the polynomial) and using ...
• 384k
1 vote

### a function to extract all subexpressions from an expression

Your use of the head Inactive[] complicates this a bit, but generally, you'll want to do this: ...
• 8,557

Only top scored, non community-wiki answers of a minimum length are eligible