You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Define a method sum_eq_n? which 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. An empty array should sum to zero by definition.
# Examples:
# sum_eq_n?([1, 2, 3, 4], 6) == true # 4 + 2 = 6
# sum_eq_n?([1, 2, 3, 4], 8) == false # Not possible
# sum_eq_n?([], 0) == true # An empty array should sum to 0