摘要: This problem need to solve mutiple Strings, so we use a Trie to store all strings, and then do DFS. Time complexity: O(m*n*3L), L is the maximum of th 阅读全文
posted @ 2022-03-08 15:28 阳光明媚的菲越 阅读(31) 评论(0) 推荐(0) 编辑
摘要: Although this is a matrix problem, but it cannot be done by BFS, following is my solution, but it doesn't work when the test case is: [["A","B","C","E 阅读全文
posted @ 2022-03-08 12:56 阳光明媚的菲越 阅读(36) 评论(0) 推荐(0) 编辑
摘要: If you know how to solve 827. Making A Large Island, then this one is a piece of cake: class Solution { private int res =0; int m,n; public int numIsl 阅读全文
posted @ 2022-03-08 08:33 阳光明媚的菲越 阅读(20) 评论(0) 推荐(0) 编辑
摘要: This problem is based on 695. Max Area of Island 1. Create a islands matrix, if a cell in grid is 1, there will be a corresponding island number in is 阅读全文
posted @ 2022-03-08 08:16 阳光明媚的菲越 阅读(24) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2022-03-08 05:17 阳光明媚的菲越 阅读(0) 评论(0) 推荐(0) 编辑