Created
October 27, 2014 07:02
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def threesum | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment