Facebook | Phone Screen | Tuple Combination Sum
6339
Jun 17, 2017
Aug 09, 2019
Q: Write a function that list any 3 elements that sum to zero, from an array of integers.
Notes:
- We need all unique solutions. (-5, -5, 10) is same as (10, -5, -5)
- The same element can be used multiple times.
Example
Input: [-5, 1, 10, 2, 3] // array of integers
Output: [(-5, -5, 10), (-5, 2, 3)] // array of tuples
Comments (13)


