
Matrix
文章平均质量分 83
yuanhisn
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 54 - Spiral Matrix
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]...原创 2015-02-21 14:16:00 · 87 阅读 · 0 评论 -
Google Interview - Print Matrix Diagonally
Given a 2D matrix, print all elements of the given matrix in diagonal order. For example, consider the following 5 X 4 input matrix. 1 2 3 4 5 6 7 8 9 10 ...原创 2015-06-05 01:12:52 · 101 阅读 · 0 评论 -
Google Interview - Flowing Water
Given a N*N matrix contains lakes, each lake is represented by an elevation. The water in each lake can flow to its neighbours which has lower or equal elevations.Suppose the left and top side of t...原创 2015-06-15 09:19:59 · 98 阅读 · 0 评论 -
Find Islands
Given matrix MxN of 0s and 1s, return and output all groups of adjacent 1s in form of (row,col)...1s are considered adjacent if they are adjacent horizontally or vertically.1 1 0 1 0 11 1 1 1 ...原创 2015-06-24 11:22:07 · 142 阅读 · 0 评论