Skip to content

Instantly share code, notes, and snippets.

@mosdevly
Created October 27, 2014 07:02
Show Gist options
  • Save mosdevly/78f32674e8cfe3d48c5a to your computer and use it in GitHub Desktop.
Save mosdevly/78f32674e8cfe3d48c5a to your computer and use it in GitHub Desktop.
Given an array A of x integers, find all unique triplets in the array which gives a sum of zero. For example, if A = {-2 0 2 4 -2 -8} a solution set is: (-2, 0, 2)
def threesum
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment