[LeetCode] 864. Shortest Path to Get All Keys 获得所有钥匙的最短路径
grid "." "#" "@" "a" "b" , ...) are keys, and ( "A" "B" , ...) are locks. K -1 . Example 1: Input: ["@.a.#","###.#","b.A.B"] Output: 8 Example 2: Input: ["@..aA","..B#.","....b"] Output: 6 Note: grid[i][j] '#' '@' 'a'-``'f``' 'A'-'F' [1, 6] Github 同步地址: https://github.com/grandyang/leetcode/issues/864 参考资料: https://leetcode.com/problems/shortest-path-to-get-all-keys/ LeetCode All in One 题目讲解汇总(持续更新中...)