Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Click here
Sort array. Iterate with three pointers, moving them if needed. Skip same elements. O(n^2) time, O(n) space if allocating new array, O(1) space if not allocating.Run make to run python and Swift files.