摘要: LeetCode 0529. Minesweeper扫雷游戏【Medium】【Python】【DFS】 Problem LeetCode Let's play the minesweeper game (Wikipedia, online game)! You are given a 2D char 阅读全文
posted @ 2020-08-21 17:15 Wonz 阅读(126) 评论(0) 推荐(0) 编辑
摘要: LeetCode 0647. Palindromic Substrings回文子串【Medium】【Python】【中心扩展】【动态规划】 Problem LeetCode Given a string, your task is to count how many palindromic subs 阅读全文
posted @ 2020-08-21 16:41 Wonz 阅读(140) 评论(0) 推荐(0) 编辑
摘要: LeetCode 0111. Minimum Depth of Binary Tree二叉树的最小深度【Easy】【Python】【二叉树】 Problem LeetCode Given a binary tree, find its minimum depth. The minimum depth 阅读全文
posted @ 2020-08-21 15:54 Wonz 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 迭代器 wiki百科:在 Python 中,迭代器是遵循迭代协议的对象。使用 iter() 从任何序列对象中得到迭代器(如 list, tuple, dictionary, set 等)。另一种形式的输入迭代器是 generator(生成器)。 举例 # 迭代器部分 # 简单的遍历方法 for it 阅读全文
posted @ 2020-08-21 14:56 Wonz 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 关系型数据库 定义:由二维表及其之间的联系所组成的一个数据组织。 举例:mysql/oracle/sql server/sqlite 优点: 易于维护:表结构 使用方便:SQL语言通用 复杂操作:支持SQL,支持复杂查询 缺点: 读写性能比较差 固定的表结构,灵活度稍欠 硬盘I/O是一个很大的瓶颈 阅读全文
posted @ 2020-08-21 14:04 Wonz 阅读(885) 评论(0) 推荐(0) 编辑
摘要: 装饰器 本质是一个接受参数为函数的函数。 作用:为一个已经实现的方法添加额外的通用功能,比如日志记录、运行计时等。 举例 不带参数的装饰器,不用@ # 不带参数的装饰器 def deco_test(func): def wrapper(*args, **kwargs): print("before 阅读全文
posted @ 2020-08-21 10:54 Wonz 阅读(130) 评论(0) 推荐(0) 编辑