Pergunta de entrevista da empresa Cadence Design Systems

Given 99 unique numbers between 1..100 how do you find the missing number.

Resposta da entrevista

Sigiloso

10 de jun. de 2011

If the numbers 1 through 100 are added together, the total would be 5050. Thus, if you have 99 unique numbers between 1 and 100, add them together and subtract the total from 5050. The difference is the missing number.

3