Pergunta de entrevista da empresa Imperva

Find the missing number in the array in a memory-efficient way, given that the array is guaranteed to have a range of numbers between 1 and n, when one number is missing.

Resposta da entrevista

Sigiloso

26 de set. de 2025

Assuming the range allows it, sum the actual numbers and subtract the result from the total sum of all numbers in that range.