even if you rectify the problem of duplicates. if you put 10,1,2,7,6,1,5 and target 8 in the custom input section it still answers with duplicates. wasted too much time
You’re right. I didn’t understand your comment when I first read it.
Other folks: Even if you make changes in the solution to account for duplicates in the array, DO NOT TEST the logic with the given test input ([10,1,2,7,6,1,5] and target 8). The output will still be wrong for some weird reason. Test it with some different, custom input.