Guidewire interview question

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

Interview Answer

Anonymous

14 Feb 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.