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. For example, given array S = [-1,…
题目: 给定一个数组candidates和一个目标值target,求出数组中相加结果为target的数字组合: 举例: For example, given candidate set [2, 3, 6, 7] and target 7, A solution set is: [[7],[2, 2, 3]] 从举例中可以看出,同一个数字可以使用多次,且结果是唯一的: 解题思路: 我个人感觉该题目一点也不难,其实也是一个递归的过程,当达到递归条件时,就将结果加入结果集: 首先题目没说给的数组有啥特…