![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode bfs
zg轩
你要知道什么是自己想要的,知道什么是不可逆转的,知道用什么方式实现梦想,知道用什么心情面对苦难,人就在转瞬间感悟,进退得失不离不弃也就有了答案。我不知道命运会把我带到何方,但是我会一直用善良维护其左右
展开
-
leetcode 864 获得钥匙的最短路径
题目: We are given a 2-dimensional grid. “.” is an empty cell, “#” is a wall, “@” is the starting point, (“a”, “b”, …) are keys, and (“A”, “B”, …) are locks. We start at the starting point, and one move...原创 2019-01-31 12:53:21 · 588 阅读 · 0 评论 -
leetcode 787 航班最少花费
题目: There are n cities connected by m flights. Each fight starts from city u and arrives at v with a price w. Now given all the cities and flights, together with starting city src and the destination ...原创 2019-01-22 16:40:07 · 525 阅读 · 0 评论 -
leetcode 847 访问所有结点的最短路径
题目: An undirected, connected graph of N nodes (labeled 0, 1, 2, …, N-1) is given as graph. graph.length = N, and j != i is in the list graph[i] exactly once, if and only if nodes i and j are connected...原创 2019-01-29 11:35:54 · 556 阅读 · 0 评论 -
leetcode 743网络延迟
题目: There are N network nodes, labelled 1 to N. Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the target node, and w is the time it takes...原创 2019-01-29 14:57:06 · 128 阅读 · 0 评论 -
leetcode 407 储水II
题目: Share Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to trap after raining. Note: Both m and n a...原创 2019-01-29 16:16:11 · 266 阅读 · 0 评论 -
leetcode 815 巴士路线
题目: We have a list of bus routes. Each routes[i] is a bus route that the i-th bus repeats forever. For example if routes[0] = [1, 5, 7], this means that the first bus (0-th indexed) travels in the seq...原创 2019-01-29 18:41:56 · 401 阅读 · 0 评论 -
leetcode210 课程表II
题目: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a p...原创 2019-01-31 09:16:59 · 136 阅读 · 0 评论