The sorting was not intended to show the hierarchy of the nodes, but to give you an order to insert nodes with your original code that would give you the correct results. Given your original code, it would always work if (and only if) you inserted the larger ranges before the smaller ones.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^5: How to create a Tree::DAG_Node tree with sorted hash elements
by roboticus
in thread How to create a Tree::DAG_Node tree with sorted hash elements
by benny_vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |