杨村长 NodeJS与服务器端
// 计算解集 => 把单一解放入解集中 => 解集 + 单一解 + 数据源
helper(result, list, nums[, ?]);
return result;}private void helper(List<List<Integer>> result, List<Integer> list, int[] nums, int pos [, ?]) {
// 递归退出条件
if (condition xx) {
return;
}
// 单一解何时加入解集中 => deep copy
if (condition xx) {
result.add(new ArrayList(list));
}