Google Interview Question

Find the average of values in an array accounting for integer overflow

Interview Answer

Anonymous

Aug 16, 2014

Divide each number by length of array, then sum up. If the largest number in array does not overflow, neither will this sum at any point during its computation.

2