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 b8b7c86 commit 1a00ff9Copy full SHA for 1a00ff9
contains-duplicate/easyone-jwlee.go
@@ -0,0 +1,10 @@
1
+func containsDuplicate(nums []int) bool {
2
+ m := make(map[int]int)
3
+ for _, num := range nums {
4
+ if _, ok := m[num]; ok {
5
+ return true
6
+ }
7
+ m[num] = num
8
9
+ return false
10
+}
0 commit comments