Question
Given a strictly increasing sorted array `sorted_vals`, you may build a binary search tree from it by repeatedly choosing a value as the root and recursing on the left and right halves. Return the minimum possible height of such a BST, where height is the number of nodes on the longest root-to-leaf path (an empty tree has height 0, a single node has height 1). `0 <= len(sorted_vals) <= 100000`.
balanced_bst_height(sorted_vals: list[int]) → int[[1,2,3,4,5,6,7]]out3State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.