Here is the question:- https://leetcode.com/problems/combination-sum-ii/, and here is the code implemented to solve it:- https://ide.codingblocks.com/s/453803.
Please note few things before proceeding:-
i) when I don’t comment out line 12 then the answer is something diff and also 1 is repeating twice, though it should not and also the sum of ans 1 1 2 is not equal to target 5.
2) When I comment out line 12 then answer is something different and repeat, though I have used set therefore, to store unique combinations, still getting the duplicate vectors.
Please specify what is the mistake.?