Find duplicate number
Hey i need help with a challenge i got about finding a duplicate number. the challeng is at the top of main.py.
The first thing i thought of broke a rule.
Can you help me?
You sorted the array so yeah, you broke a rule :(
However your complexity is good 👍
If you want an other idea, you can loop on the array and for every number, try to find the same number somewhere else.
But this will be O(n^2)
Good luck ;)