摘要:
Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's. You must do it in place. Example 1: Input: matrix = [[ 阅读全文
posted @ 2020-02-14 06:52
CNoodle
阅读(466)
评论(0)
推荐(0)
摘要:
Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. Example 1: Input: n = 3 Output: [[1,2,3],[8,9, 阅读全文
posted @ 2020-02-14 03:24
CNoodle
阅读(460)
评论(0)
推荐(0)
摘要:
Given an m x n matrix, return all elements of the matrix in spiral order. Example 1: Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Output: [1,2,3,6,9,8,7, 阅读全文
posted @ 2020-02-14 02:44
CNoodle
阅读(443)
评论(0)
推荐(0)
摘要:
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means 阅读全文
posted @ 2020-02-14 01:51
CNoodle
阅读(487)
评论(0)
推荐(0)