Convert Sorted Array to Binary Search Tree (Picturing the Recursion)
问题 I want to convert a sorted integer array into a binary search tree. I believe I understand how to do this. I have posted my pseudo-code below. What I cannot picture is how the recursion actually works. So if my array is 1, 2, 3, 4, 5... I first make 3 the root of my BST. Then I make 2 the left-child node of 3. Then do I make 1 the left-child node of 2, and come back to 2? I don't get how the recursion steps through the whole process... Thanks in advance, and apologies if this question is