摘要:
1 """ 2 Given 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 阅读全文
摘要:
1 """ 2 There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., N-1, and each room may have some keys to access th 阅读全文
摘要:
1 """ 2 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. 3 For example, given n = 3, a solution 阅读全文
摘要:
1 """ 2 Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. 3 The distance between two adjacent cells is 1. 4 Exampl 阅读全文