未验证 提交 288cb157 编写于 作者: K Keqi Huang 提交者: GitHub

Update 0109._convert_sorted_list_to_binary_search_tree.md

上级 9bb1aa3a
### 109. Convert Sorted List to Binary Search Tree
# 109. Convert Sorted List to Binary Search Tree
**<font color=orange>难度: Medium</font>**
## 刷题内容
题目:
<https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/>
> 原题连接
* https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/
难度:
> 内容描述
Medium
```
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
Example:
Given the sorted linked list: [-10,-3,0,5,9],
One possible answer is: [0,-3,9,-10,null,5], which represents the following height balanced BST:
0
/ \
-3 9
/ /
-10 5
```
## 解题方案
思路:
> 思路 1
******- 时间复杂度: O(N)******- 空间复杂度: O(N)******
跟第 108 题一样
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册