2025年3月21日
摘要: 代码随想录 解题过程中二叉树主要有两种形式: 1. 满二叉树 2. 完全二叉树 优先级队列其实是一个堆,堆就是一棵完全二叉树,同时保证父子节点的顺序关系。 二、二叉搜索树 三、平衡二叉搜索树 阅读全文
posted @ 2025-03-21 20:42 axuu 阅读(9) 评论(0) 推荐(0)
摘要: python解法 class Solution: def simplifyPath(self, path: str) -> str: path1 = path.split('/') path2 = [] for item in path1: if item == '' or item == '.': 阅读全文
posted @ 2025-03-21 18:17 axuu 阅读(15) 评论(0) 推荐(0)