Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Find the duplicate number
- # Script from Joma Tech on YT
- def findDuplicate(nums):
- nums.sort()
- for i in range(1, len(nums)):
- if nums[i] == nums[i - 1]:
- return nums[i]
- print(findDuplicate([3, 1, 3, 4, 2]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement