Pergunta de entrevista da empresa Guidewire

Write a function which searches an array of integers and returns a boolean if any two sum to a specificied integer

Resposta da entrevista

Sigiloso

14 de fev. de 2018

Discussed brute force (nested loop) and also discussed HashMap approach. Add all integers as keys to HashMap. Iterate and try to get(complementary_number) where complementary number is the required sum - the current number.