首页 > 其他 > 详细

(leetcode)Product of Array Except Self

时间:2015-09-01 12:33:42      阅读:212      评论:0      收藏:0      [点我收藏+]

Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].

Solve it without division and in O(n).

For example, given [1,2,3,4], return [24,12,8,6].

Follow up:
Could you solve it with constant space complexity? (Note: The output array does not count as extra space for the purpose of space complexity analysis.)

返回一个数组a[],使得a[i]为原数组中出第i个元素外所有元素的乘积。

方法一:超时,将左半边和右半边的乘积相乘。

 1 class Solution {
 2 public:
 3     vector<int> productExceptSelf(vector<int>& nums) {
 4         int len = nums.size();
 5         int start,end,sumlo,sumhi;
 6         vector<int> ans;
 7         for(int i = 0; i < len; ++i)
 8         {
 9             start = 0;
10             end = len -1;
11             sumlo = sumhi = 1;
12             while(start < i)
13             {
14                 sumlo *= nums[start++];
15             }
16             while(end > i)
17             {
18                 sumhi *= nums[end--];
19             }
20             ans.push_back(sumlo * sumhi);
21         }
22         
23         return ans;
24     }
25 };

Submission Result: Time Limit ExceededMore Details 

Last executed input:[-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,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1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1]

方法二:
先计算出用ans[i]记录钱i-1个元素的乘积,然后再从后面计算后面的乘积 即可

 1 class Solution {
 2 public:
 3     vector<int> productExceptSelf(vector<int>& nums) {
 4         int len = nums.size();
 5         vector<int> ans(len,1);
 6         for(int i = 1; i < len;++i)
 7         {
 8             ans[i] = ans[i-1] * nums[i-1];
 9         }
10         
11         int right = 1;
12         for(int i = len -1;i>=0;--i)
13         {
14             ans[i] *= right;
15             right *= nums[i];
16         }
17         return ans;
18     }
19 };

 

(leetcode)Product of Array Except Self

原文:http://www.cnblogs.com/chdxiaoming/p/4775172.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!