Skip to content

Commit 13c190d

Browse files
authored
Update pair_sum_unsorted.go
Use `return []int{}` instead of `return nil` in order to keep consistency with origial Python solition.
1 parent a6a1a8a commit 13c190d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/Hash Maps and Sets/pair_sum_unsorted.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ func pairSumUnsorted(nums []int, target int) []int {
77
}
88
hashmap[x] = i
99
}
10-
return nil
10+
return []int{}
1111
}

0 commit comments

Comments
 (0)