Fixed some functions

isBalancedBST needed to be fixed for two special cases. BST2Array and
allocBalancedBST have been worked on.