摘要: https://leetcode.cn/problems/rotting-oranges/description/?envType=study-plan-v2&envId=top-100-liked 从一个点向上下左右移动并且判断是否边界可以用 for dx, dy in [(1, 0), (-1, 阅读全文
posted @ 2024-04-29 12:18 peterzh6 阅读(2) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.cn/problems/interleaving-string/description/?envType=study-plan-v2&envId=top-interview-150 以下是通过动态规划解决该问题的正确方法。首先,如果字符串 s1 和 s2 的长度之和 阅读全文
posted @ 2024-04-29 11:07 peterzh6 阅读(2) 评论(0) 推荐(0) 编辑