Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
LeetCode 217 - Contains Duplicate - NeetCode solution
nathanwailes
Oct 5th, 2023
1,075
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.23 KB
| None
|
0
0
raw
download
clone
embed
print
report
class
Solution:
def
containsDuplicate
(
self
,
nums: List
[
int
]
)
-
>
bool
:
hashset
=
set
(
)
for
n
in
nums:
if
n
in
hashset:
return
True
hashset.
add
(
n
)
return
False
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
✅ MAKE $22OO IN 10 MIN 4
JavaScript | 14 sec ago | 0.08 KB
FREE BTC GUIDE 0
JavaScript | 33 sec ago | 0.08 KB
FREE BTC GUIDE 9
JavaScript | 47 sec ago | 0.08 KB
Make 3500$ in 20 MIN [Method] E
JavaScript | 48 sec ago | 0.08 KB
Make 3500$ in 20 MIN [Method] Q
JavaScript | 58 sec ago | 0.08 KB
$200 INSTANTLY [Works Worldwide]? SD
Java | 1 min ago | 0.05 KB
Make 3500$ in 20 MIN [Method] K
JavaScript | 1 min ago | 0.08 KB
Make $2500 in 15 minutes 4
JavaScript | 1 min ago | 0.08 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!