Question: *** RUBY ONLY *** Define a method sum_to_n?(array, n) that takes an array of integers and an additional integer, n, as arguments and returns true
*** RUBY ONLY ***
Define a method sum_to_n?(array, n) that takes an array of integers and an additional integer, n, as arguments and returns true if any two elements in the array of integers sum to n. sum_to_n?([], n) should return false for any value of n, by definition. Run associated tests via: $ rspec spec/part1_spec.rb:42
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
