We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8669da commit 2b171ccCopy full SHA for 2b171cc
contains-duplicate/invidam.go
@@ -1,5 +1,5 @@
1
func containsDuplicate(nums []int) bool {
2
- appeared := make(map[int]bool, len(nums))
+ appeared := make(map[int]bool, len(nums)/4)
3
4
for _, num := range nums {
5
if _, found := appeared[num]; found {
0 commit comments