DEV Community

Discussion on: How often You Have to use the Concepts of Trees in your algo

Collapse
 
jasogamol profile image
Mark Piffer

I think it largely depends on the field of work that you are in. As soon as there is some form of language involved (think 'language' as the symbolic way to represent the problem, even if its never explicitly used) which allows recursive formulation of problems, a tree will be a natural and human-friendly solution to it. Also many problems which deal with out-of-order input/output are approachable with a hierarchical organisation and therefore tree algorithms. And if you happen to be confined in a functional language environment, trees are most often the natural way to deal even with ordinary (that is: iterative) data. The GNU make library I've written recently has quite a few of these, as well as a decision tree for arbitrary length division.