摘要:
This is a easier common grap and look for shortest path problem, time complexity: O(m*n): class Solution { public int getFood(char[][] grid) { int m =
阅读全文
posted @ 2022-03-05 15:02
阳光明媚的菲越
阅读(25)
推荐(0)
编辑
摘要:
This is graph and look for the shortest path, so BFS should be solution. But how to handle K? We can look K as a parameter of every node. My first sol
阅读全文
posted @ 2022-03-05 14:29
阳光明媚的菲越
阅读(39)
推荐(0)
编辑
摘要:
This is a graph problem, and the problem try to find the shortest path. So BFS is just right solution, the following is my first solution. It works bu
阅读全文
posted @ 2022-03-05 09:03
阳光明媚的菲越
阅读(31)
推荐(0)
编辑