Find the Duplicate Number
Medium📝 Description
Find the duplicate number in an array of integers
Input Format
Array of integers with one duplicate
Output Format
Duplicate number
Constraints
2 ≤ n ≤ 10^5
🔍 Sample Input
[1,3,4,2,2]
✅ Sample Output
2
Code Editor
Please login to run and submit code.
Results
Suggested Solution
Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run