摘要: To some string S, we will perform some replacement operations that replace groups of letters with new ones (not necessarily the same size). Each repla 阅读全文
posted @ 2018-12-24 15:38 yuxihong 阅读(184) 评论(0) 推荐(0)
摘要: Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal. Exampl 阅读全文
posted @ 2018-12-24 14:49 yuxihong 阅读(143) 评论(0) 推荐(0)
摘要: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2018-12-24 00:53 yuxihong 阅读(227) 评论(0) 推荐(0)