上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 40 下一页
摘要: 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-09-16 03:43 amazingzoe 阅读(126) 评论(0) 推荐(0)
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4],t 阅读全文
posted @ 2016-09-15 13:49 amazingzoe 阅读(133) 评论(0) 推荐(0)
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2016-09-15 03:43 amazingzoe 阅读(143) 评论(0) 推荐(0)
摘要: Given an array of integers A and let n to be its length. Assume Bk to be an array obtained by rotating the array A k positions clock-wise, we define a 阅读全文
posted @ 2016-09-15 02:39 amazingzoe 阅读(385) 评论(0) 推荐(0)
摘要: Given an array of integers, find the subarray with smallest sum. Return the sum of the subarray. Notice The subarray should contain one integer at lea 阅读全文
posted @ 2016-09-12 12:39 amazingzoe 阅读(143) 评论(0) 推荐(0)
摘要: Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... Notice Please complete the problem in-place. 阅读全文
posted @ 2016-09-08 11:16 amazingzoe 阅读(165) 评论(0) 推荐(0)
摘要: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ 阅读全文
posted @ 2016-09-08 05:54 amazingzoe 阅读(196) 评论(0) 推荐(0)
摘要: Given a non-overlapping interval list which is sorted by start point. Insert a new interval into it, make sure the list is still in order and non-over 阅读全文
posted @ 2016-09-08 04:37 amazingzoe 阅读(193) 评论(0) 推荐(0)
摘要: Design an iterator over a binary search tree with the following rules: Elements are visited in ascending order (i.e. an in-order traversal) next() and 阅读全文
posted @ 2016-09-07 23:53 amazingzoe 阅读(167) 评论(0) 推荐(0)
摘要: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, 阅读全文
posted @ 2016-09-07 09:40 amazingzoe 阅读(177) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 40 下一页