bst from sorted array