摘要: 题目: Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are lab 阅读全文
posted @ 2017-05-14 22:53 panini 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges 阅读全文
posted @ 2017-05-14 12:01 panini 阅读(190) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven a 2D grid, each cell is either a wall 2, a zombie 1 or people 0 (the number zero, one, two).Zombies can turn the nearest people(up/do 阅读全文
posted @ 2017-05-14 10:33 panini 阅读(517) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven a knight in a chessboard (a binary matrix with 0 as empty and 1 as barrier) with a source position, find the shortest path to a desti 阅读全文
posted @ 2017-05-14 09:16 panini 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 ha 阅读全文
posted @ 2017-05-14 01:07 panini 阅读(221) 评论(0) 推荐(0) 编辑