Challenge: Create a Binary Search Tree From the Sorted List

Let’s create a binary search tree from a sorted list.


Create a binary search tree from a list of values in sorted order.


An array of integers.


A binary search tree.

Sample input

array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Sample output

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.