DEV Community 👩‍💻👨‍💻

Discussion on: Daily Coding Problem #1

Collapse
chenge profile image
chenge • Edited on

arr, sum = [10, 15, 3, 7], 17
(arr.combination 2).any?{ |a| a[0] + a[1] == sum }