Gist of the Day: Find Which List Items Make Up a Given Sum

Here’s the scenario: you have two lists of integers, and you have a sum. Write an algorithm – in Perl, of course – to find which two items when summed give you a specified number. If no pairing exists, don’t return anything. If a pairing does exist, return the first pair you encounter. Remember, you could get two very large input lists. Continue reading Gist of the Day: Find Which List Items Make Up a Given Sum