time and space complexity for balanced binary tree added