in reply to Re^3: out of order tree generation
in thread out of order tree generation

thanks! This is actually a passion project -- i need to track upgrades to units in a game.

Replies are listed 'Best First'.
Re^5: out of order tree generation
by LanX (Saint) on Apr 04, 2019 at 01:25 UTC
    Good luck! =)

    As a side note, efficiently printing the tree is far more challenging.

    I'd probably try a recursive approach where you first calculate all subtrees and their width to be able to design the actual tree.

    But this wouldn't be as space efficient as your handmade diagram.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice