Fixing an edge case bug where the sum is same because of duplicates. 1+3 == 2+2 but 2+2 is not valid solution