摘要: 思路简单,状态转移方程容易想。需要注意的是转移时的一些状态,比如是否连通,等等。 class Solution: def maxVacationDays(self, flights: List[List[int]], days: List[List[int]]) -> int: n = len(fl 阅读全文
posted @ 2020-02-03 23:14 阿牧遥 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 用了前缀集合,高级的可以用前缀树 class Solution: def findWords(self, board: List[List[str]], words: List[str]) -> List[str]: if len(board) == 0 or len(board[0]) == 0: 阅读全文
posted @ 2020-02-03 00:17 阿牧遥 阅读(160) 评论(0) 推荐(0) 编辑