码迷,mamicode.com
首页 > 其他好文 > 详细

代码面试集锦 1 - Uber

时间:2019-02-11 10:22:20      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:original   expec   for   visio   widget   example   height   net   integer   

Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i.

For example, if our input was [1, 2, 3, 4, 5], the expected output would be [120, 60, 40, 30, 24]. If our input was [3, 2, 1], the expected output would be [2, 3, 6].

Follow-up: what if you can‘t use division?

代码面试集锦 1 - Uber

标签:original   expec   for   visio   widget   example   height   net   integer   

原文地址:https://www.cnblogs.com/Wonner/p/10360787.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!