![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法-bfs
大大kc
今日事,今日毕
展开
-
leetcode323. Number of Connected Components in an Undirected Graph
解法一bfs/** * @Author RenXintao * @Date 9/8/17 */class UndirectedGraphNode { int label; ArrayList<UndirectedGraphNode> neighbors; UndirectedGraphNode(int x) { label = x; ne原创 2017-09-08 20:15:22 · 458 阅读 · 0 评论 -
leetcode200. Number of Islands
200. Number of IslandsGiven a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or verti原创 2017-09-29 21:25:41 · 313 阅读 · 0 评论