1. 首页
  2. 数据库
  3. 其它
  4. 《剑指Offer》刷题笔记——面试题36. 二叉搜索树与双向链表

《剑指Offer》刷题笔记——面试题36. 二叉搜索树与双向链表

上传者: 2020-12-23 03:00:41上传 PDF文件 118.66KB 热度 15次
难度:中等 一、题目描述: 二、解题分析: class Solution: def __init__(self): self.head, self.pre = None, None def treeToDoublyList(self, root: 'Node') -> 'Node': if not root: return None # 二叉搜索树的中序遍历是递增的,因此把标准中序遍历中 改变每个父节点的左右指向即可 # head, pre, tail = None,None,None #
下载地址
用户评论