当前位置:网站首页>Leetcode 238. product of arrays other than itself

Leetcode 238. product of arrays other than itself

2022-07-23 20:00:00 I'm not Xiao Haiwa~~~~

Give you an array of integers nums, return Array answer , among answer[i] be equal to nums Middle Division nums[i] Product of other elements .

Subject data Guarantee Array nums The product of all prefix elements and suffixes of any element in 32 position In the range of integers .

Please do not use division , And in O(n) Complete this question in time complexity .

Example 1:

 Input : nums = [1,2,3,4]
 Output : [24,12,8,
原网站

版权声明
本文为[I'm not Xiao Haiwa~~~~]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207231826287220.html