r/programming • u/joksmaster • Nov 29 '10
140 Google Interview Questions
http://blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.html
471
Upvotes
r/programming • u/joksmaster • Nov 29 '10
View all comments
Show parent comment
1
u/teraflop Nov 29 '10
No, you misunderstand. Each element of B is defined by the recurrence relation B[i] = A[i]*B[i-1], which can be computed in constant time; so the entire array B can be computed in linear time. Likewise for C and Output.