I have written some python code that will take an unbalanced binary tree and balance it, however this has proven to take a long time with very large trees so I'm looking for an easier way...
I was just wondering if it is possible to maintain the trees balance WHILE its being built, so I don't have to waste resources balancing trees after they've already been built.
Thanks