Re: Google onsite interview questions

#1.

sum of n numbers is n(n+1)/2

here:

f(x) = 3*(n*(n+1)/2) should be equal to sum of given numbers say q(n).

so the missing number is | f(x) - q(n) |

this rule is applicable, as the numbers are contiguous.