-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有序链表转换二叉搜索树 #85
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
习题
思路
高度平衡二叉树每一个节点的左子树和右子树的节点的个数相差不超过1,所以我们可以先将链表转换成数组,从数组中间将数组分成两个子数组。再采用递归的方式,即可得到完整的树
解答
The text was updated successfully, but these errors were encountered: