Medium
Quiz
#109 Convert Sorted List to Binary Search Tree
APPROACH
Given the head of a sorted singly linked list (values in ascending order), construct and return a height-balanced binary search tree.
Example 1:
Input: head = [-10,-3,0,5,9]
Output: [0,-3,9,-10,null,5]
Explanation: One possible answer is [0,-3,9,-10,null,5], which represents the shown height balanced BST.
Example 2:
Input: head = []
Output: []
1 of 4
1:00
What is the optimal approach for this problem?