-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
@shiiaii
Description
You code does not skip the duplicated combination.
You need to add skip duplicated combination . See below.
if nums[i] > target {
break
}
// the following to skip the duplicated combination
if (len(c)!=0 && nums[i] < c[len(c)-1]) {
continue
}
Metadata
Metadata
Assignees
Labels
No labels