(1) 给一个数组A[1..n],请在O(n)的时间里构造一个新的数组
B[1..n],使得B[i]=A[1]*A[2]*…*A[n]/A[i]。不能使用除法运算
(2) 给定一个数组A[1..n],求出任意n-1个数的乘积中最大的一个。
不能使用除法运算
http://spellscroll.com/questionfull/169/
Thursday, October 23, 2008
Subscribe to:
Post Comments (Atom)
A collection of all kinds of technical interview questions (programming, algorithm, probability, brainteaser, mathematics, etc.) from various companies (google, microsoft, yahoo, etc.)
No comments:
Post a Comment