public List<List<Integer>> threeSum(int[] num) {
		Arrays.sort(num);
		int sum = 0;
		int start = 0;
		int front = 1;
		int end = num.length - 1;
		int cal = 0;
		List<List<Integer>> result = new ArrayList<List<Integer>>();
		List<Integer> temp;
		while (front < end) {
			cal = sum - num[start];
			if (start > 0 && num[start] == num[start - 1]) {
				front = end;
			}
			while (front < end) {
				if (front > start + 1 && num[front] == num[front - 1]) {
					front++;
					continue;
				}
				if (num[front] + num[end] == cal) {
					temp = new ArrayList<Integer>();
					temp.add(num[start]);
					temp.add(num[front]);
					temp.add(num[end]);
					result.add(temp);
					front++;
					end--;
				} else if (num[front] + num[end] < cal) {
					front++;
				} else {
					end--;
				}
			}
			start = start + 1;
			front = start + 1;
			end = num.length - 1;
		}
		return result;
	}