上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: ###题目链接 https://leetcode-cn.com/problems/summary-ranges/ ###代码实现 class Solution: def summaryRanges(self, nums: List[int]) -> List[str]: res = [] if no 阅读全文
posted @ 2021-01-10 09:40 deepwzh 阅读(44) 评论(0) 推荐(0) 编辑
摘要: ##题目链接 https://leetcode-cn.com/problems/validate-binary-search-tree/ ##个人题解 ###解法1 ####思路 根据二叉搜索树定义,左子树值均小于根,右子树值均大于根。由此便想到自下而上维护每个子树中最大最小值,确保树根左子树最大值 阅读全文
posted @ 2021-01-08 19:23 deepwzh 阅读(75) 评论(0) 推荐(0) 编辑
摘要: ##深度优先搜索 ###专题页 https://leetcode-cn.com/tag/depth-first-search/ ###题解记录 111. 二叉树的最小深度 难度:简单 98. 验证二叉搜索树 难度:中等 阅读全文
posted @ 2021-01-08 17:05 deepwzh 阅读(39) 评论(0) 推荐(0) 编辑
摘要: ##题目链接 https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/ ##个人题解 class Solution { private: int min_h; void dfs(TreeNode * root, int h){ if 阅读全文
posted @ 2021-01-08 17:02 deepwzh 阅读(58) 评论(0) 推荐(0) 编辑
摘要: ##题目链接 https://leetcode-cn.com/problems/leaf-similar-trees/ ##个人实现: #include <vector> class Solution { private: void dfs(TreeNode * root, vector<int> 阅读全文
posted @ 2021-01-08 16:53 deepwzh 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 最近开始写Leetcode的每日一题,以后会将个人解法发布在这里。目前打算尽量用多种语言,多种方法来完成这些题目。 2020.1 2020.1.7 547. 省份数量 难度:中等 待更新 2020.1.8 189. 旋转数组 难度:中等 https://www.cnblogs.com/Wade-/p 阅读全文
posted @ 2021-01-08 10:05 deepwzh 阅读(60) 评论(0) 推荐(0) 编辑
摘要: ##个人题解1:python,一行流,时间复杂度O(n),空间复杂度O(n) ###完整代码: class Solution: def rotate(self, nums: List[int], k: int) -> None: nums[:] = (nums + nums)[len(nums)-k 阅读全文
posted @ 2021-01-08 10:03 deepwzh 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 数据集网站收集(持续更新) 1.Kaggle: "https://www.kaggle.com/" 可以按关键字搜索数据集 自带讨论区 有热心群众分享自己的Kernel,可供参考(热心群众们自己对数据的分析代码) 2.天池: "https://tianchi.aliyun.com/competiti 阅读全文
posted @ 2020-04-13 23:45 deepwzh 阅读(2024) 评论(0) 推荐(0) 编辑
摘要: 1.安装postcss import,postcss cssnext 包 2.修改package.json 将postcss响应的内容替换为 "postcss": { "plugins": { "postcss import": {}, "postcss cssnext": {} } }, 阅读全文
posted @ 2019-03-14 20:41 deepwzh 阅读(5227) 评论(0) 推荐(0) 编辑
摘要: 入驻博客园自2012年至今已经五年了,虽然没有更新多少东西 新博客地址: http://www.92ac.cn 本博客没有特殊情况就停止更新了 感谢博客园提供这么好的平台 阅读全文
posted @ 2017-05-18 17:58 deepwzh 阅读(252) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页