摘要: Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the or 阅读全文
posted @ 2019-02-27 18:04 WhoDreamsSky 阅读(81) 评论(0) 推荐(0) 编辑
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Y 阅读全文
posted @ 2019-02-26 21:54 WhoDreamsSky 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 报错如下: [Error] #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must b 阅读全文
posted @ 2019-02-26 16:55 WhoDreamsSky 阅读(682) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
posted @ 2019-02-26 16:07 WhoDreamsSky 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: Example 2: 阅读全文
posted @ 2019-02-26 12:32 WhoDreamsSky 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k num 阅读全文
posted @ 2019-02-25 09:59 WhoDreamsSky 阅读(78) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: E 阅读全文
posted @ 2019-02-24 22:41 WhoDreamsSky 阅读(82) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Foll 阅读全文
posted @ 2019-02-24 22:22 WhoDreamsSky 阅读(66) 评论(0) 推荐(0) 编辑
摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文
posted @ 2019-02-24 17:14 WhoDreamsSky 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. Exampl 阅读全文
posted @ 2019-02-24 14:32 WhoDreamsSky 阅读(75) 评论(0) 推荐(0) 编辑