摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-11-09 06:15 逸朵 阅读(90) 评论(0) 推荐(0)
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-11-09 05:28 逸朵 阅读(99) 评论(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 @ 2017-11-09 05:04 逸朵 阅读(125) 评论(0) 推荐(0)
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, 阅读全文
posted @ 2017-11-09 04:37 逸朵 阅读(140) 评论(0) 推荐(0)
摘要: le is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solution 阅读全文
posted @ 2017-11-09 04:23 逸朵 阅读(114) 评论(0) 推荐(0)
摘要: Implement pow(x, n). Example 1: Example 2: 阅读全文
posted @ 2017-11-09 02:40 逸朵 阅读(150) 评论(0) 推荐(0)
摘要: u are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note:You have to rotate the image in-place, which me 阅读全文
posted @ 2017-11-09 02:17 逸朵 阅读(167) 评论(0) 推荐(0)
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following unique pe 阅读全文
posted @ 2017-11-09 01:29 逸朵 阅读(106) 评论(0) 推荐(0)
摘要: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2, 阅读全文
posted @ 2017-11-09 01:14 逸朵 阅读(110) 评论(0) 推荐(0)
摘要: Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including 阅读全文
posted @ 2017-11-08 12:40 逸朵 阅读(117) 评论(0) 推荐(0)