108. Convert Sorted Array to Binary Search Tree
·
Algorithm
Convert Sorted Array to Binary Search Tree - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. DFS class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: def dfs(cur_list): if not cur_list: return None mid = len(cur_list) // 2 cur_node = TreeNode(cur_list[mid]) c..