Skip to content

Instantly share code, notes, and snippets.

@kruszczynski
Created April 30, 2019 12:54
Show Gist options
  • Save kruszczynski/f34caf60808c6ce9904bcbd7f86405c6 to your computer and use it in GitHub Desktop.
Save kruszczynski/f34caf60808c6ce9904bcbd7f86405c6 to your computer and use it in GitHub Desktop.

Given an array of positive integers, write a function which returns all the unique pairs which add (equal) up to 100.

Example data:

sample_data = [0, 1, 100, 99, 0, 10, 90, 30, 55, 33, 55, 75, 50, 51, 49, 50, 51, 49, 51]
sample_output = [[1,99], [0,100], [10,90], [51,49], [50,50]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment