Hello Droid....and other lurkers 
A follow on problem to the first "Two Sum" question posted. This week, "3sum". Its apparently medium difficulty.
15. 3Sum - https://leetcode.com/problems/3sum/description/
How it works/Rules:
A follow on problem to the first "Two Sum" question posted. This week, "3sum". Its apparently medium difficulty.
15. 3Sum - https://leetcode.com/problems/3sum/description/
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note: The solution set must not contain duplicate triplets.
Code:For example, given array S = [-1, 0, 1, 2, -1, -4], A solution set is: [ [-1, 0, 1], [-1, -1, 2] ]
How it works/Rules:
- We use the random question picker (sometimes), and all attempt it, one question a week.
- No cheating/looking at the editorial solution until your soln is accepted on leetcode, and you're convinced you can't get it any quicker.
- Language is up to you, this may help people appreciate other languages as well
- Only post your time taken, language, and percentage of submissions beaten at first. Use spoiler+php tags for your code.
/inb4 threesome jokes