07 2020 档案

摘要:https://leetcode-cn.com/problems/hanota-lcci/ 先将最底层圆盘之上的圆盘看做一个整体。汉诺塔问题的本质是 将最底层圆盘之上的圆盘全部放到辅助柱上 将最底层圆盘放到目标柱上 递归地处理辅助柱上的圆盘 而第一步又可以变成一个目标柱为辅助柱的汉诺塔问题,即sel 阅读全文
posted @ 2020-07-31 14:14 luozx207 阅读(667) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-lcof/ 朴素遍历法 class Solution(object): def minArray(self, numbers): """ :type numbe 阅读全文
posted @ 2020-07-22 14:17 luozx207 阅读(138) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/is-graph-bipartite/ 动态维护A、B集合算法 class Solution(object): def isBipartite(self, graph): """ :type graph: List[List[int] 阅读全文
posted @ 2020-07-16 11:23 luozx207 阅读(150) 评论(0) 推荐(0)