上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 29 下一页
摘要: Find the number connected component in the undirected graph. Each node in the graph contains a label and a list of its neighbors. (a connected compone 阅读全文
posted @ 2017-10-31 11:17 jasminemzy 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Notice Return 0 i 阅读全文
posted @ 2017-10-31 05:21 jasminemzy 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Six degrees of separation is the theory that everyone and everything is six or fewer steps away, by way of introduction, from any other person in the 阅读全文
posted @ 2017-10-31 01:45 jasminemzy 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a set of n substrings. You are supposed to remove every instance of those n substrings from s so that s is of the minimum length 阅读全文
posted @ 2017-10-30 13:55 jasminemzy 阅读(301) 评论(0) 推荐(0) 编辑
摘要: Given a 2D grid, each cell is either a wall 2, an house 1or empty 0 (the number zero, one, two), find a place to build a post office so that the sum o 阅读全文
posted @ 2017-10-29 14:35 jasminemzy 阅读(298) 评论(0) 推荐(0) 编辑
摘要: Given a 2D grid, each cell is either an house 1 or empty 0 (the number zero, one), find the place to build a post office, the distance that post offic 阅读全文
posted @ 2017-10-29 12:37 jasminemzy 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Given 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 destination posi 阅读全文
posted @ 2017-10-29 06:41 jasminemzy 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Given a 2D grid, each cell is either a wall 2, a zombie 1or people 0 (the number zero, one, two).Zombies can turn the nearest people(up/down/left/righ 阅读全文
posted @ 2017-10-28 08:52 jasminemzy 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Given a boolean 2D matrix, 0 is represented as the sea, 1 is represented as the island. If two 1 is adjacent, we consider them in the same island. We 阅读全文
posted @ 2017-10-27 14:21 jasminemzy 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O''s into 'X''s in that surround 阅读全文
posted @ 2017-10-27 06:03 jasminemzy 阅读(148) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 29 下一页