摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
该文被密码保护。 阅读全文