Refactor "convert a sorted array into a balanced BST".