Problem statement:
Given an array of unsorted numbers, find all unique triplets in it that add up to zero .
First example:
Input: [-3, 0, 1, 2, -1, 1, -2]
Output: [-3, 1, 2], [-2, 0, 2], **[-2, 1, 1]**, [-1, 0, 1]
Third triplet contains two ones. Therefore, by unique, do you mean unique indexes from the array, and not unique values?