No for-loop. More intuitive.
I noticed the for-loop is used for all the backtracing questions. It is fine. However, it\'s more intuitive if each recursion focuses on itself - choose or not 
I noticed the for-loop is used for all the backtracing questions. It is fine. However, it\'s more intuitive if each recursion focuses on itself - choose or not choose.\n\nThe non for-loop is a general solution if you don\'t need to leap and inspect all other elements in the dataset.\n\nUse this question as example. Here\'s the code:\n```\nclass Solution {\n    public List<List<Integer>> subsetsWithDup(int[] nums) {\n        List<List<Integer>> ret = new ArrayList<>();\n        Arrays.sort(nums);\n        subset(nums, 0, new ArrayList<>(), ret);\n        return ret;\n    }\n    \n    private void subset(int[] nums, int index, List<Integer> parts, List<List<Integer>> ret) {\n        if(index == nums.length) {\n            ret.add(new ArrayList<>(parts));\n            return;\n        }\n        parts.add(nums[index]);\n        subset(nums, index+1, parts, ret);\n        parts.remove(parts.size()-1);\n        \n        while(index+1 < nums.length && nums[index+1] == nums[index]) {\n            ++index;\n        }\n        subset(nums, index+1, parts, ret);\n    }\n}\n```\n\nUpdated on 08/16/2021: another example we can apply choose or not choose\nhttps://leetcode.com/problems/partition-to-k-equal-sum-subsets/discuss/1407822/No-for-loop.-More-intuitive.
[]