This commit is contained in:
2026-05-25 12:29:20 +05:00
parent 9d30fc897c
commit ec7f45e03a
4 changed files with 102 additions and 0 deletions

9
solutions/lc2540.py Normal file
View File

@@ -0,0 +1,9 @@
class Solution:
def getCommon(self, nums1: List[int], nums2: List[int]) -> int:
s1 = set(nums1)
for num in nums2:
if num in s1:
return num
else:
return -1