摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up:Could you do this in-place? 题目大意是将矩阵做就地顺 阅读全文
posted @ 2016-06-27 18:07 Miller1991 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. 阅读全文
posted @ 2016-06-27 16:17 Miller1991 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For exa 阅读全文
posted @ 2016-06-27 15:33 Miller1991 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i 阅读全文
posted @ 2016-06-27 15:02 Miller1991 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 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: You s 阅读全文
posted @ 2016-06-27 14:23 Miller1991 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3, You should return the followi 阅读全文
posted @ 2016-06-27 14:00 Miller1991 阅读(368) 评论(0) 推荐(0) 编辑
摘要: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th 阅读全文
posted @ 2016-06-27 13:35 Miller1991 阅读(137) 评论(0) 推荐(0) 编辑
摘要: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num 阅读全文
posted @ 2016-06-27 11:38 Miller1991 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library functio 阅读全文
posted @ 2016-06-27 10:32 Miller1991 阅读(826) 评论(0) 推荐(0) 编辑
摘要: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: Subscribe to see which 阅读全文
posted @ 2016-06-27 10:06 Miller1991 阅读(95) 评论(0) 推荐(0) 编辑