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

浙公网安备 33010602011771号