B Seven
B Seven

Reputation: 45941

What is a use case for an unordered Binary Tree?

Does anyone use unordered Binary Trees?

I don't see any advantage to using an unordered Binary Tree over an array.

Upvotes: 4

Views: 1438

Answers (2)

Joop Eggen
Joop Eggen

Reputation: 109603

To represent a simple expression language with operators of at most two arguments.

  +
 / \
3   *
   / \
  4   5

Upvotes: 3

displayName
displayName

Reputation: 14389

Generating Unordered Binary Trees is necessary in both the graph theory and in different applications. For example, a list of all trees with a given number of internal nodes can be used in computer science to test or analyze an algorithm for its correctness or computational complexity.

Source

Upvotes: 2

Related Questions