/PairWithGivenSum

Ruby gem for finding a pair with a given sum

Primary LanguageRubyOtherNOASSERTION

PairWithGivenSum

This gem takes an integer array and an integer and returns a pair from the array whose sum is equal to the integer.

Getting Started

Install the gem.

gem install pair_with_given_sum

Usage

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