This gem takes an integer array and an integer and returns a pair from the array whose sum is equal to the integer.
Install the gem.
gem install pair_with_given_sum
Give it an integer array and an integer via the command line.
pair_with_given_sum "[2, 4, 8, 11, 16, 18, 20, 0, 1 , 3, 34]" 15