Originally Posted by Fader_Berg You're allocating the root node twice. You don't have to allocate the root node explicitly, since buildTree does it for you. Thanks for pointing that out.